From 22f5408a1c4d6b0cb92dcac0f40d71a2ef107462 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Thu, 27 Oct 2022 17:15:27 +0200 Subject: [PATCH] Always allow collapsing sections to fix cases where state doesn't restore Change-Id: Ib609de02b48b84a08e0643281a918793074ccc9d --- .../vector/app/features/home/room/list/RoomListFragment.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 6d82da7577..30364ee93e 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 @@ -243,8 +243,9 @@ class RoomListFragment : } private fun refreshCollapseStates() { - val sectionsCount = adapterInfosList.count { !it.sectionHeaderAdapter.roomsSectionData.isHidden } - val isRoomSectionCollapsable = sectionsCount > 1 + // SC: let's just always allow collapsing sections. This messes with our persisted collapse state otherwise. + // val sectionsCount = adapterInfosList.count { !it.sectionHeaderAdapter.roomsSectionData.isHidden } + val isRoomSectionCollapsable = true // sectionsCount > 1 if (lastLoadForcedExpand && isRoomSectionCollapsable) { loadExpandStatus() }