This commit is contained in:
Benoit Marty 2020-11-26 22:43:51 +01:00 committed by Benoit Marty
parent a813610c04
commit 476f721f5e
4 changed files with 8 additions and 14 deletions

View file

@ -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
)

View file

@ -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
)
}
}

View file

@ -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
)

View file

@ -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
)
)
}