mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 21:48:50 +03:00
Adds error throw for LoginActivity LoginMode Unknown
This commit is contained in:
parent
a173accfa5
commit
ef59faf160
2 changed files with 165 additions and 163 deletions
|
@ -67,9 +67,11 @@ internal class DefaultRegistrationWizard(
|
||||||
return performRegistrationRequest(params, LoginType.PASSWORD)
|
return performRegistrationRequest(params, LoginType.PASSWORD)
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun createAccount(userName: String?,
|
override suspend fun createAccount(
|
||||||
|
userName: String?,
|
||||||
password: String?,
|
password: String?,
|
||||||
initialDeviceDisplayName: String?): RegistrationResult {
|
initialDeviceDisplayName: String?
|
||||||
|
): RegistrationResult {
|
||||||
val params = RegistrationParams(
|
val params = RegistrationParams(
|
||||||
username = userName,
|
username = userName,
|
||||||
password = password,
|
password = password,
|
||||||
|
|
|
@ -252,7 +252,7 @@ open class LoginActivity : VectorBaseActivity<ActivityLoginBinding>(), UnlockedA
|
||||||
SignMode.SignIn -> {
|
SignMode.SignIn -> {
|
||||||
// It depends on the LoginMode
|
// It depends on the LoginMode
|
||||||
when (state.loginMode) {
|
when (state.loginMode) {
|
||||||
LoginMode.Unknown,
|
LoginMode.Unknown -> error("Developer error")
|
||||||
is LoginMode.Sso -> launchSsoFlow()
|
is LoginMode.Sso -> launchSsoFlow()
|
||||||
is LoginMode.SsoAndPassword,
|
is LoginMode.SsoAndPassword,
|
||||||
LoginMode.Password -> addFragmentToBackstack(views.loginFragmentContainer,
|
LoginMode.Password -> addFragmentToBackstack(views.loginFragmentContainer,
|
||||||
|
|
Loading…
Reference in a new issue