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

DROID-2388 Multiplayer | Fix | Show storage option only for the owner. (#1342)

This commit is contained in:
Konstantin Ivanov 2024-07-01 14:05:30 +02:00 committed by GitHub
parent d99d338835
commit 522363e7d0
Signed by: github
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -35,6 +35,10 @@ enum class SpaceMemberPermissions(
OWNER(2),
NO_PERMISSIONS(3);
fun isOwner() : Boolean {
return this == OWNER
}
fun isOwnerOrEditor() : Boolean {
return this == OWNER || this == WRITER
}

View file

@ -141,7 +141,7 @@ fun SpaceSettingsScreen(
}
when(state) {
is ViewState.Success -> {
if (state.data.permissions.isOwnerOrEditor()) {
if (state.data.permissions.isOwner()) {
item {
Option(
image = R.drawable.ic_file_storage,