From d5b0ffacf8be6d596f434ffd21ab9e4bbdab238c Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Tue, 12 Apr 2022 09:23:38 +0200 Subject: [PATCH] Home pager space swipe: ensure we don't use legacy groups Change-Id: Icb7ce90dcb1ae013b999c9db9b7b9a3d984dc83f --- .../vector/app/features/home/room/list/RoomListViewModel.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListViewModel.kt index 924655af9f..5135cf13c4 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListViewModel.kt @@ -36,6 +36,7 @@ import im.vector.app.core.platform.VectorViewModel import im.vector.app.core.resources.StringProvider import im.vector.app.features.analytics.AnalyticsTracker import im.vector.app.features.displayname.getBestName +import im.vector.app.features.home.room.list.RoomListSectionBuilderSpace.Companion.SPACE_ID_FOLLOW_APP import im.vector.app.features.invite.AutoAcceptInvites import im.vector.app.features.settings.VectorPreferences import kotlinx.coroutines.Dispatchers @@ -134,7 +135,8 @@ class RoomListViewModel @AssistedInject constructor( companion object : MavericksViewModelFactory by hiltMavericksViewModelFactory() - private val roomListSectionBuilder = if (appStateHandler.getCurrentRoomGroupingMethod() is RoomGroupingMethod.BySpace) { + private val roomListSectionBuilder = if (initialState.explicitSpaceId != SPACE_ID_FOLLOW_APP || + appStateHandler.getCurrentRoomGroupingMethod() is RoomGroupingMethod.BySpace) { RoomListSectionBuilderSpace( session, stringProvider,