From 3bfae2a28b43dff5a8e04b7ce8c5edbf233a122f Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Wed, 14 Apr 2021 16:43:54 +0200 Subject: [PATCH] Fix invalid expand status on tab switch Change-Id: I8db822d61b93b0b6f12ecbe4c7270f42c204caa5 --- .../im/vector/app/features/home/room/list/RoomListFragment.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 d0fae229fa..de04700273 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 @@ -297,7 +297,9 @@ class RoomListFragment @Inject constructor( ) ) concatAdapter.addAdapter(sectionAdapter) - concatAdapter.addAdapter(contentAdapter.adapter) + if (section.isExpanded.value.orTrue()) { + concatAdapter.addAdapter(contentAdapter.adapter) + } } // Add the footer controller