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

View file

@ -260,7 +260,7 @@ class FtueAuthVariant(
}
private fun onStartCombinedLogin() {
addRegistrationStageFragmentToBackstack(FtueAuthCombinedLoginFragment::class.java)
addRegistrationStageFragmentToBackstack(FtueAuthCombinedLoginFragment::class.java, allowStateLoss = true)
}
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(
views.loginFragmentContainer,
fragmentClass,
params,
tag = FRAGMENT_REGISTRATION_STAGE_TAG,
option = commonOption
option = commonOption,
allowStateLoss = allowStateLoss,
)
}