dropping the backstack when switching to the account created flow to avoid going back to the sign up screens

This commit is contained in:
Adam Brown 2022-02-04 17:28:40 +00:00
parent d186de7472
commit 6687e2cad4

View File

@ -32,6 +32,7 @@ import im.vector.app.core.extensions.POP_BACK_STACK_EXCLUSIVE
import im.vector.app.core.extensions.addFragment import im.vector.app.core.extensions.addFragment
import im.vector.app.core.extensions.addFragmentToBackstack import im.vector.app.core.extensions.addFragmentToBackstack
import im.vector.app.core.extensions.exhaustive import im.vector.app.core.extensions.exhaustive
import im.vector.app.core.extensions.replaceFragment
import im.vector.app.core.platform.ScreenOrientationLocker import im.vector.app.core.platform.ScreenOrientationLocker
import im.vector.app.core.platform.VectorBaseActivity import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivityLoginBinding import im.vector.app.databinding.ActivityLoginBinding
@ -374,10 +375,10 @@ class FtueAuthVariant(
private fun onAccountCreated() { private fun onAccountCreated() {
if (vectorFeatures.isOnboardingPersonalizeEnabled()) { if (vectorFeatures.isOnboardingPersonalizeEnabled()) {
activity.addFragmentToBackstack( activity.supportFragmentManager.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE)
activity.replaceFragment(
views.loginFragmentContainer, views.loginFragmentContainer,
FtueAuthAccountCreatedFragment::class.java, FtueAuthAccountCreatedFragment::class.java,
option = commonOption
) )
} else { } else {
navigateToHome(createdAccount = true) navigateToHome(createdAccount = true)