Only allow paging for room list tab
Change-Id: I4a19b516fe821b00224b90832f31360d4243bed4
This commit is contained in:
parent
e2e068f549
commit
98f05b25e2
|
@ -518,7 +518,7 @@ class HomeDetailFragment @Inject constructor(
|
||||||
|
|
||||||
private fun setupViewPager(roomGroupingMethod: RoomGroupingMethod, spaces: List<RoomSummary>?, tab: HomeTab) {
|
private fun setupViewPager(roomGroupingMethod: RoomGroupingMethod, spaces: List<RoomSummary>?, tab: HomeTab) {
|
||||||
val oldAdapter = views.roomListContainerPager.adapter as? FragmentStateAdapter
|
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")
|
if (DEBUG_VIEW_PAGER) Timber.i("Home pager: setup, old adapter: $oldAdapter")
|
||||||
val unsafeSpaces = spaces?.map { it.roomId } ?: listOf()
|
val unsafeSpaces = spaces?.map { it.roomId } ?: listOf()
|
||||||
val selectedSpaceId = (roomGroupingMethod as? RoomGroupingMethod.BySpace)?.spaceSummary?.roomId
|
val selectedSpaceId = (roomGroupingMethod as? RoomGroupingMethod.BySpace)?.spaceSummary?.roomId
|
||||||
|
|
Loading…
Reference in New Issue