Replaces else cases in when branches to RoomListDisplayMode.FILTERED
This commit is contained in:
parent
0250f61d10
commit
a3367d4075
|
@ -204,7 +204,7 @@ class RoomListFragment @Inject constructor(
|
|||
RoomListDisplayMode.NOTIFICATIONS -> views.createChatFabMenu.isVisible = true
|
||||
RoomListDisplayMode.PEOPLE -> views.createChatRoomButton.isVisible = true
|
||||
RoomListDisplayMode.ROOMS -> views.createGroupRoomButton.isVisible = true
|
||||
else -> Unit // No button in this mode
|
||||
RoomListDisplayMode.FILTERED -> Unit // No button in this mode
|
||||
}
|
||||
|
||||
views.createChatRoomButton.debouncedClicks {
|
||||
|
@ -230,7 +230,7 @@ class RoomListFragment @Inject constructor(
|
|||
RoomListDisplayMode.NOTIFICATIONS -> views.createChatFabMenu.hide()
|
||||
RoomListDisplayMode.PEOPLE -> views.createChatRoomButton.hide()
|
||||
RoomListDisplayMode.ROOMS -> views.createGroupRoomButton.hide()
|
||||
else -> Unit
|
||||
RoomListDisplayMode.FILTERED -> Unit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ class RoomListFragment @Inject constructor(
|
|||
)
|
||||
}
|
||||
}
|
||||
section.isExpanded.observe(viewLifecycleOwner) { _ ->
|
||||
section.isExpanded.observe(viewLifecycleOwner) {
|
||||
refreshCollapseStates()
|
||||
}
|
||||
controller.listener = this
|
||||
|
@ -330,7 +330,7 @@ class RoomListFragment @Inject constructor(
|
|||
checkEmptyState()
|
||||
}
|
||||
observeItemCount(section, sectionAdapter)
|
||||
section.isExpanded.observe(viewLifecycleOwner) { _ ->
|
||||
section.isExpanded.observe(viewLifecycleOwner) {
|
||||
refreshCollapseStates()
|
||||
}
|
||||
controller.listener = this
|
||||
|
@ -359,7 +359,7 @@ class RoomListFragment @Inject constructor(
|
|||
)
|
||||
}
|
||||
}
|
||||
section.isExpanded.observe(viewLifecycleOwner) { _ ->
|
||||
section.isExpanded.observe(viewLifecycleOwner) {
|
||||
refreshCollapseStates()
|
||||
}
|
||||
controller.listener = this
|
||||
|
@ -395,7 +395,7 @@ class RoomListFragment @Inject constructor(
|
|||
RoomListDisplayMode.NOTIFICATIONS -> views.createChatFabMenu.show()
|
||||
RoomListDisplayMode.PEOPLE -> views.createChatRoomButton.show()
|
||||
RoomListDisplayMode.ROOMS -> views.createGroupRoomButton.show()
|
||||
else -> Unit
|
||||
RoomListDisplayMode.FILTERED -> Unit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -474,7 +474,8 @@ class RoomListFragment @Inject constructor(
|
|||
StateView.State.Empty(
|
||||
title = getString(R.string.room_list_catchup_empty_title),
|
||||
image = ContextCompat.getDrawable(requireContext(), R.drawable.ic_noun_party_popper),
|
||||
message = getString(R.string.room_list_catchup_empty_body))
|
||||
message = getString(R.string.room_list_catchup_empty_body)
|
||||
)
|
||||
}
|
||||
RoomListDisplayMode.PEOPLE ->
|
||||
StateView.State.Empty(
|
||||
|
@ -490,7 +491,7 @@ class RoomListFragment @Inject constructor(
|
|||
isBigImage = true,
|
||||
message = getString(R.string.room_list_rooms_empty_body)
|
||||
)
|
||||
else ->
|
||||
RoomListDisplayMode.FILTERED ->
|
||||
// Always display the content in this mode, because if the footer
|
||||
StateView.State.Content
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue