diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListFragment.kt index aaa469f68d..ef7a1012df 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListFragment.kt @@ -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 }