adds feature flag usage to registration flow result
This commit is contained in:
parent
507ddc2d4a
commit
713248805c
@ -123,8 +123,7 @@ class FtueAuthVariant(
|
||||
private fun handleOnboardingViewEvents(viewEvents: OnboardingViewEvents) {
|
||||
when (viewEvents) {
|
||||
is OnboardingViewEvents.RegistrationFlowResult -> {
|
||||
// Check that all flows are supported by the application
|
||||
if (viewEvents.flowResult.missingStages.any { !it.isSupported() }) {
|
||||
if (registrationShouldFallback(viewEvents)) {
|
||||
// Display a popup to propose use web fallback
|
||||
onRegistrationStageNotSupported()
|
||||
} else {
|
||||
@ -223,6 +222,12 @@ class FtueAuthVariant(
|
||||
}.exhaustive
|
||||
}
|
||||
|
||||
private fun registrationShouldFallback(registrationFlowResult: OnboardingViewEvents.RegistrationFlowResult) =
|
||||
vectorFeatures.isForceLoginFallbackEnabled() || registrationFlowResult.containsUnsupportedRegistrationFlow()
|
||||
|
||||
private fun OnboardingViewEvents.RegistrationFlowResult.containsUnsupportedRegistrationFlow() =
|
||||
flowResult.missingStages.any { !it.isSupported() }
|
||||
|
||||
private fun updateWithState(viewState: OnboardingViewState) {
|
||||
if (viewState.isUserLogged()) {
|
||||
val intent = HomeActivity.newIntent(
|
||||
|
Loading…
x
Reference in New Issue
Block a user