mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 18:35:40 +03:00
Cleanup
This commit is contained in:
parent
a813610c04
commit
476f721f5e
4 changed files with 8 additions and 14 deletions
|
@ -24,11 +24,10 @@ class RoomHistoryVisibilityAction(
|
|||
val roomHistoryVisibility: RoomHistoryVisibility,
|
||||
title: String,
|
||||
@DrawableRes iconResId: Int,
|
||||
isSelected: Boolean,
|
||||
destructive: Boolean
|
||||
isSelected: Boolean
|
||||
) : BottomSheetGenericAction(
|
||||
title = title,
|
||||
iconResId = iconResId,
|
||||
isSelected = isSelected,
|
||||
destructive = destructive
|
||||
destructive = false
|
||||
)
|
||||
|
|
|
@ -37,8 +37,7 @@ class RoomHistoryVisibilityController @Inject constructor(
|
|||
roomHistoryVisibility = roomHistoryVisibility,
|
||||
title = historyVisibilityFormatter.getSetting(roomHistoryVisibility),
|
||||
iconResId = 0,
|
||||
isSelected = roomHistoryVisibility == state.currentRoomHistoryVisibility,
|
||||
destructive = false
|
||||
isSelected = roomHistoryVisibility == state.currentRoomHistoryVisibility
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,11 +26,10 @@ class RoomJoinRuleAction(
|
|||
val roomGuestAccess: GuestAccess?,
|
||||
title: String,
|
||||
@DrawableRes iconResId: Int,
|
||||
isSelected: Boolean,
|
||||
destructive: Boolean
|
||||
isSelected: Boolean
|
||||
) : BottomSheetGenericAction(
|
||||
title = title,
|
||||
iconResId = iconResId,
|
||||
isSelected = isSelected,
|
||||
destructive = destructive
|
||||
destructive = false
|
||||
)
|
||||
|
|
|
@ -34,24 +34,21 @@ class RoomJoinRuleController @Inject constructor(
|
|||
roomGuestAccess = null,
|
||||
title = stringProvider.getString(R.string.room_settings_room_access_entry_only_invited),
|
||||
iconResId = 0,
|
||||
isSelected = state.currentRoomJoinRule == RoomJoinRules.INVITE,
|
||||
destructive = false
|
||||
isSelected = state.currentRoomJoinRule == RoomJoinRules.INVITE
|
||||
),
|
||||
RoomJoinRuleAction(
|
||||
roomJoinRule = RoomJoinRules.PUBLIC,
|
||||
roomGuestAccess = GuestAccess.Forbidden,
|
||||
title = stringProvider.getString(R.string.room_settings_room_access_entry_anyone_with_link_apart_guest),
|
||||
iconResId = 0,
|
||||
isSelected = state.currentRoomJoinRule == RoomJoinRules.PUBLIC && state.currentGuestAccess == GuestAccess.Forbidden,
|
||||
destructive = false
|
||||
isSelected = state.currentRoomJoinRule == RoomJoinRules.PUBLIC && state.currentGuestAccess == GuestAccess.Forbidden
|
||||
),
|
||||
RoomJoinRuleAction(
|
||||
roomJoinRule = RoomJoinRules.PUBLIC,
|
||||
roomGuestAccess = GuestAccess.CanJoin,
|
||||
title = stringProvider.getString(R.string.room_settings_room_access_entry_anyone_with_link_including_guest),
|
||||
iconResId = 0,
|
||||
isSelected = state.currentRoomJoinRule == RoomJoinRules.PUBLIC && state.currentGuestAccess == GuestAccess.CanJoin,
|
||||
destructive = false
|
||||
isSelected = state.currentRoomJoinRule == RoomJoinRules.PUBLIC && state.currentGuestAccess == GuestAccess.CanJoin
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue