From 98f05b25e2d3c1bf9c7b6bfc336e2ad8e6042463 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Fri, 24 Dec 2021 10:12:19 +0100 Subject: [PATCH] Only allow paging for room list tab Change-Id: I4a19b516fe821b00224b90832f31360d4243bed4 --- .../main/java/im/vector/app/features/home/HomeDetailFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt b/vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt index d2f2a15042..0eefc6a35f 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt @@ -518,7 +518,7 @@ class HomeDetailFragment @Inject constructor( private fun setupViewPager(roomGroupingMethod: RoomGroupingMethod, spaces: List?, tab: HomeTab) { val oldAdapter = views.roomListContainerPager.adapter as? FragmentStateAdapter - val pagingAllowed = vectorPreferences.enableSpacePager() + val pagingAllowed = vectorPreferences.enableSpacePager() && tab is HomeTab.RoomList if (DEBUG_VIEW_PAGER) Timber.i("Home pager: setup, old adapter: $oldAdapter") val unsafeSpaces = spaces?.map { it.roomId } ?: listOf() val selectedSpaceId = (roomGroupingMethod as? RoomGroupingMethod.BySpace)?.spaceSummary?.roomId