Better name
This commit is contained in:
parent
93ffb116b7
commit
d07a95204b
@ -124,8 +124,8 @@ class RoomSettingsController @Inject constructor(
|
|||||||
subtitle = newHistoryVisibility ?: historyVisibility,
|
subtitle = newHistoryVisibility ?: historyVisibility,
|
||||||
dividerColor = dividerColor,
|
dividerColor = dividerColor,
|
||||||
divider = false,
|
divider = false,
|
||||||
editable = data.actionPermissions.canChangeHistoryReadability,
|
editable = data.actionPermissions.canChangeHistoryVisibility,
|
||||||
action = { if (data.actionPermissions.canChangeHistoryReadability) callback?.onHistoryVisibilityClicked() }
|
action = { if (data.actionPermissions.canChangeHistoryVisibility) callback?.onHistoryVisibilityClicked() }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class RoomSettingsViewModel @AssistedInject constructor(@Assisted initialState:
|
|||||||
canChangeAvatar = powerLevelsHelper.isUserAllowedToSend(session.myUserId, true, EventType.STATE_ROOM_AVATAR),
|
canChangeAvatar = powerLevelsHelper.isUserAllowedToSend(session.myUserId, true, EventType.STATE_ROOM_AVATAR),
|
||||||
canChangeName = powerLevelsHelper.isUserAllowedToSend(session.myUserId, true, EventType.STATE_ROOM_NAME),
|
canChangeName = powerLevelsHelper.isUserAllowedToSend(session.myUserId, true, EventType.STATE_ROOM_NAME),
|
||||||
canChangeTopic = powerLevelsHelper.isUserAllowedToSend(session.myUserId, true, EventType.STATE_ROOM_TOPIC),
|
canChangeTopic = powerLevelsHelper.isUserAllowedToSend(session.myUserId, true, EventType.STATE_ROOM_TOPIC),
|
||||||
canChangeHistoryReadability = powerLevelsHelper.isUserAllowedToSend(session.myUserId, true,
|
canChangeHistoryVisibility = powerLevelsHelper.isUserAllowedToSend(session.myUserId, true,
|
||||||
EventType.STATE_ROOM_HISTORY_VISIBILITY)
|
EventType.STATE_ROOM_HISTORY_VISIBILITY)
|
||||||
)
|
)
|
||||||
setState { copy(actionPermissions = permissions) }
|
setState { copy(actionPermissions = permissions) }
|
||||||
|
@ -45,7 +45,7 @@ data class RoomSettingsViewState(
|
|||||||
val canChangeAvatar: Boolean = false,
|
val canChangeAvatar: Boolean = false,
|
||||||
val canChangeName: Boolean = false,
|
val canChangeName: Boolean = false,
|
||||||
val canChangeTopic: Boolean = false,
|
val canChangeTopic: Boolean = false,
|
||||||
val canChangeHistoryReadability: Boolean = false
|
val canChangeHistoryVisibility: Boolean = false
|
||||||
)
|
)
|
||||||
|
|
||||||
sealed class AvatarAction {
|
sealed class AvatarAction {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user