fixing onboarding crash when signing in/up with sso -

handles the sso flows by not forwarding to the signin/signup pages and instead using the previous onLoginFlowRetrieved when the selected server type is other
This commit is contained in:
Adam Brown 2022-01-18 10:29:26 +00:00
parent f5b16b834c
commit 114c60cfed

View file

@ -826,6 +826,7 @@ class OnboardingViewModel @AssistedInject constructor(
}
withState {
if (it.serverType == ServerType.MatrixOrg) {
when (it.onboardingFlow) {
OnboardingFlow.SignIn -> handleUpdateSignMode(OnboardingAction.UpdateSignMode(SignMode.SignIn))
OnboardingFlow.SignUp -> handleUpdateSignMode(OnboardingAction.UpdateSignMode(SignMode.SignUp))
@ -834,6 +835,9 @@ class OnboardingViewModel @AssistedInject constructor(
_viewEvents.post(OnboardingViewEvents.OnLoginFlowRetrieved)
}
}
} else {
_viewEvents.post(OnboardingViewEvents.OnLoginFlowRetrieved)
}
}
}
}