allowing the combined login flow to have state loss as the transaction occurs asynchronusly

This commit is contained in:
Adam Brown 2022-08-16 15:54:32 +01:00
parent 0dcab56e34
commit 2b382d1249
1 changed files with 4 additions and 3 deletions

View File

@ -260,7 +260,7 @@ class FtueAuthVariant(
} }
private fun onStartCombinedLogin() { private fun onStartCombinedLogin() {
addRegistrationStageFragmentToBackstack(FtueAuthCombinedLoginFragment::class.java) addRegistrationStageFragmentToBackstack(FtueAuthCombinedLoginFragment::class.java, allowStateLoss = true)
} }
private fun openStartCombinedRegister() { private fun openStartCombinedRegister() {
@ -519,13 +519,14 @@ class FtueAuthVariant(
) )
} }
private fun addRegistrationStageFragmentToBackstack(fragmentClass: Class<out Fragment>, params: Parcelable? = null) { private fun addRegistrationStageFragmentToBackstack(fragmentClass: Class<out Fragment>, params: Parcelable? = null, allowStateLoss: Boolean = false) {
activity.addFragmentToBackstack( activity.addFragmentToBackstack(
views.loginFragmentContainer, views.loginFragmentContainer,
fragmentClass, fragmentClass,
params, params,
tag = FRAGMENT_REGISTRATION_STAGE_TAG, tag = FRAGMENT_REGISTRATION_STAGE_TAG,
option = commonOption option = commonOption,
allowStateLoss = allowStateLoss,
) )
} }