removing no longer possible branches
This commit is contained in:
parent
c208c2d5ae
commit
96295f6102
@ -77,7 +77,7 @@ class RoomListQuickActionsEpoxyController @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RoomListQuickActionsSharedAction.Leave(roomSummary.roomId, showIcon = !true).toBottomSheetItem(5)
|
RoomListQuickActionsSharedAction.Leave(roomSummary.roomId, showIcon = !true).toBottomSheetItem()
|
||||||
}
|
}
|
||||||
|
|
||||||
@StringRes
|
@StringRes
|
||||||
@ -88,18 +88,11 @@ class RoomListQuickActionsEpoxyController @Inject constructor(
|
|||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun RoomListQuickActionsSharedAction.toBottomSheetItem(index: Int, roomNotificationState: RoomNotificationState? = null) {
|
private fun RoomListQuickActionsSharedAction.Leave.toBottomSheetItem() {
|
||||||
val host = this@RoomListQuickActionsEpoxyController
|
val host = this@RoomListQuickActionsEpoxyController
|
||||||
val selected = when (this) {
|
|
||||||
is RoomListQuickActionsSharedAction.NotificationsAllNoisy -> roomNotificationState == RoomNotificationState.ALL_MESSAGES_NOISY
|
|
||||||
is RoomListQuickActionsSharedAction.NotificationsAll -> roomNotificationState == RoomNotificationState.ALL_MESSAGES
|
|
||||||
is RoomListQuickActionsSharedAction.NotificationsMentionsOnly -> roomNotificationState == RoomNotificationState.MENTIONS_ONLY
|
|
||||||
is RoomListQuickActionsSharedAction.NotificationsMute -> roomNotificationState == RoomNotificationState.MUTE
|
|
||||||
else -> false
|
|
||||||
}
|
|
||||||
return bottomSheetActionItem {
|
return bottomSheetActionItem {
|
||||||
id("action_$index")
|
id("action_leave")
|
||||||
selected(selected)
|
selected(false)
|
||||||
if (iconResId != null) {
|
if (iconResId != null) {
|
||||||
iconRes(iconResId)
|
iconRes(iconResId)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user