1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-1019 Editor | Fix | Do not allow changing icon when object is locked (#2990)

This commit is contained in:
Evgenii Kozlov 2023-03-07 12:39:12 +01:00 committed by GitHub
parent 924249a6b9
commit 4a846c7f51
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -1,5 +1,17 @@
# Change log for Android @Anytype app.
## Version 0.15.0 (WIP)
### New features & enhancements 🚀
### Fixes & tech 🚒
* Editor | Do not allow changing icon when object is locked (#2990)
### Design & UX 🔳
## Version 0.14.0
### New features & enhancements 🚀
* Editor | Introduced inline-set block (#2864)

View file

@ -4009,6 +4009,10 @@ class EditorViewModel(
fun onPageIconClicked() {
Timber.d("onPageIconClicked, ")
if (mode == EditorMode.Locked) {
sendToast("Unlock your object to change its icon")
return
}
val restrictions = orchestrator.stores.objectRestrictions.current()
val isDetailsAllowed = restrictions.none { it == ObjectRestriction.DETAILS }
if (isDetailsAllowed) {