diff --git a/vector/src/main/java/im/vector/app/AppStateHandler.kt b/vector/src/main/java/im/vector/app/AppStateHandler.kt index 69d6763c87..b8224f6d2d 100644 --- a/vector/src/main/java/im/vector/app/AppStateHandler.kt +++ b/vector/src/main/java/im/vector/app/AppStateHandler.kt @@ -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) } 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 0d0e9cafed..7d6272cf68 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 @@ -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 {