Disable space stack for viewpager navigation

Change-Id: I7b895cc8cd945f2038bf0be07cdc140496394428
This commit is contained in:
SpiritCroc 2022-06-01 15:36:09 +02:00
parent 977ef3cd08
commit f79edd64a6
2 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ class AppStateHandler @Inject constructor(
Timber.w(Exception("Home pager: setCurrentSpace/SELECT"))
}
if (isForwardNavigation) {
if (isForwardNavigation && from in listOf(SelectSpaceFrom.SELECT, SelectSpaceFrom.INIT)) {
spaceBackstack.addLast(currentSpace?.roomId)
}

View File

@ -828,7 +828,7 @@ class HomeDetailFragment @Inject constructor(
return this
}
override fun onBackPressed(toolbarButton: Boolean) = if (getCurrentSpace() != null) {
override fun onBackPressed(toolbarButton: Boolean) = if (!pagerPagingEnabled && getCurrentSpace() != null) {
navigateBack()
true
} else {