Merge pull request #4973 from vector-im/feature/adm/ftue-other-sso-crash

Fixing onboarding crash when signing in/up on non `matrix.org` server with SSO
This commit is contained in:
Benoit Marty 2022-01-18 12:09:14 +01:00 committed by GitHub
commit e8d71feef1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 6 deletions

1
changelog.d/4969.bugfix Normal file
View file

@ -0,0 +1 @@
Fixes sign in/up crash when selecting ems and other server types which use SSO

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)
}
}
}
}