mirror of
https://github.com/element-hq/element-android
synced 2024-10-25 12:17:25 +03:00
Fix issue after rebase
This commit is contained in:
parent
d812ed72d0
commit
f0433fd27d
1 changed files with 82 additions and 86 deletions
|
@ -618,9 +618,8 @@ class LoginViewModel2 @AssistedInject constructor(
|
||||||
} catch (failure: Throwable) {
|
} catch (failure: Throwable) {
|
||||||
_viewEvents.post(LoginViewEvents2.Failure(failure))
|
_viewEvents.post(LoginViewEvents2.Failure(failure))
|
||||||
null
|
null
|
||||||
}
|
} ?: return
|
||||||
|
|
||||||
if (data is LoginFlowResult.Success) {
|
|
||||||
val loginMode = when {
|
val loginMode = when {
|
||||||
data.supportedLoginTypes.contains(LoginFlowTypes.SSO)
|
data.supportedLoginTypes.contains(LoginFlowTypes.SSO)
|
||||||
&& data.supportedLoginTypes.contains(LoginFlowTypes.PASSWORD) -> LoginMode.SsoAndPassword(data.ssoIdentityProviders)
|
&& data.supportedLoginTypes.contains(LoginFlowTypes.PASSWORD) -> LoginMode.SsoAndPassword(data.ssoIdentityProviders)
|
||||||
|
@ -661,7 +660,6 @@ class LoginViewModel2 @AssistedInject constructor(
|
||||||
_viewEvents.post(LoginViewEvents2.OutdatedHomeserver)
|
_viewEvents.post(LoginViewEvents2.OutdatedHomeserver)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private suspend fun retrieveProfileInfo(username: String) {
|
private suspend fun retrieveProfileInfo(username: String) {
|
||||||
val safeLoginWizard = loginWizard
|
val safeLoginWizard = loginWizard
|
||||||
|
@ -744,9 +742,8 @@ class LoginViewModel2 @AssistedInject constructor(
|
||||||
_viewEvents.post(LoginViewEvents2.Failure(failure))
|
_viewEvents.post(LoginViewEvents2.Failure(failure))
|
||||||
setState { copy(isLoading = false) }
|
setState { copy(isLoading = false) }
|
||||||
null
|
null
|
||||||
}
|
} ?: return@launch
|
||||||
|
|
||||||
if (data is LoginFlowResult.Success) {
|
|
||||||
// Valid Homeserver, add it to the history.
|
// Valid Homeserver, add it to the history.
|
||||||
// Note: we add what the user has input, data.homeServerUrl can be different
|
// Note: we add what the user has input, data.homeServerUrl can be different
|
||||||
rememberHomeServer(homeServerConnectionConfig.homeServerUri.toString())
|
rememberHomeServer(homeServerConnectionConfig.homeServerUri.toString())
|
||||||
|
@ -814,7 +811,6 @@ class LoginViewModel2 @AssistedInject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fun getInitialHomeServerUrl(): String? {
|
fun getInitialHomeServerUrl(): String? {
|
||||||
return loginConfig?.homeServerUrl
|
return loginConfig?.homeServerUrl
|
||||||
|
|
Loading…
Reference in a new issue