mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
Login screens: reorder reset action for clarity
This commit is contained in:
parent
fd90f3b9fc
commit
efa858a337
1 changed files with 12 additions and 12 deletions
|
@ -239,13 +239,10 @@ class LoginViewModel @AssistedInject constructor(@Assisted initialState: LoginVi
|
|||
currentTask = null
|
||||
|
||||
when (action) {
|
||||
LoginAction.ResetLogin -> {
|
||||
authenticationService.cancelPendingLoginOrRegistration()
|
||||
|
||||
LoginAction.ResetHomeServerType -> {
|
||||
setState {
|
||||
copy(
|
||||
asyncLoginAction = Uninitialized,
|
||||
asyncRegistration = Uninitialized
|
||||
serverType = ServerType.MatrixOrg
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -261,13 +258,6 @@ class LoginViewModel @AssistedInject constructor(@Assisted initialState: LoginVi
|
|||
)
|
||||
}
|
||||
}
|
||||
LoginAction.ResetHomeServerType -> {
|
||||
setState {
|
||||
copy(
|
||||
serverType = ServerType.MatrixOrg
|
||||
)
|
||||
}
|
||||
}
|
||||
LoginAction.ResetSignMode -> {
|
||||
setState {
|
||||
copy(
|
||||
|
@ -278,6 +268,16 @@ class LoginViewModel @AssistedInject constructor(@Assisted initialState: LoginVi
|
|||
)
|
||||
}
|
||||
}
|
||||
LoginAction.ResetLogin -> {
|
||||
authenticationService.cancelPendingLoginOrRegistration()
|
||||
|
||||
setState {
|
||||
copy(
|
||||
asyncLoginAction = Uninitialized,
|
||||
asyncRegistration = Uninitialized
|
||||
)
|
||||
}
|
||||
}
|
||||
LoginAction.ResetResetPassword -> {
|
||||
setState {
|
||||
copy(
|
||||
|
|
Loading…
Reference in a new issue