Login screens: split long lines

This commit is contained in:
Benoit Marty 2019-11-26 18:04:00 +01:00
parent 86bfdd011e
commit f96bea742e
1 changed files with 6 additions and 3 deletions

View File

@ -531,9 +531,12 @@ class LoginViewModel @AssistedInject constructor(@Assisted initialState: LoginVi
is LoginFlowResult.Success -> {
val loginMode = when {
// SSO login is taken first
data.loginFlowResponse.flows.any { it.type == LoginFlowTypes.SSO } -> LoginMode.Sso
data.loginFlowResponse.flows.any { it.type == LoginFlowTypes.PASSWORD } -> LoginMode.Password
else -> LoginMode.Unsupported(data.loginFlowResponse.flows.mapNotNull { it.type }.toList())
data.loginFlowResponse.flows.any { it.type == LoginFlowTypes.SSO } ->
LoginMode.Sso
data.loginFlowResponse.flows.any { it.type == LoginFlowTypes.PASSWORD } ->
LoginMode.Password
else ->
LoginMode.Unsupported(data.loginFlowResponse.flows.mapNotNull { it.type }.toList())
}
if (loginMode == LoginMode.Password && !data.isLoginAndRegistrationSupported) {