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:
parent
d99d338835
commit
522363e7d0
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue