Login screens: reorder reset action for clarity
This commit is contained in:
parent
fd90f3b9fc
commit
efa858a337
|
@ -239,13 +239,10 @@ class LoginViewModel @AssistedInject constructor(@Assisted initialState: LoginVi
|
||||||
currentTask = null
|
currentTask = null
|
||||||
|
|
||||||
when (action) {
|
when (action) {
|
||||||
LoginAction.ResetLogin -> {
|
LoginAction.ResetHomeServerType -> {
|
||||||
authenticationService.cancelPendingLoginOrRegistration()
|
|
||||||
|
|
||||||
setState {
|
setState {
|
||||||
copy(
|
copy(
|
||||||
asyncLoginAction = Uninitialized,
|
serverType = ServerType.MatrixOrg
|
||||||
asyncRegistration = Uninitialized
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -261,13 +258,6 @@ class LoginViewModel @AssistedInject constructor(@Assisted initialState: LoginVi
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LoginAction.ResetHomeServerType -> {
|
|
||||||
setState {
|
|
||||||
copy(
|
|
||||||
serverType = ServerType.MatrixOrg
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
LoginAction.ResetSignMode -> {
|
LoginAction.ResetSignMode -> {
|
||||||
setState {
|
setState {
|
||||||
copy(
|
copy(
|
||||||
|
@ -278,6 +268,16 @@ class LoginViewModel @AssistedInject constructor(@Assisted initialState: LoginVi
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LoginAction.ResetLogin -> {
|
||||||
|
authenticationService.cancelPendingLoginOrRegistration()
|
||||||
|
|
||||||
|
setState {
|
||||||
|
copy(
|
||||||
|
asyncLoginAction = Uninitialized,
|
||||||
|
asyncRegistration = Uninitialized
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
LoginAction.ResetResetPassword -> {
|
LoginAction.ResetResetPassword -> {
|
||||||
setState {
|
setState {
|
||||||
copy(
|
copy(
|
||||||
|
|
Loading…
Reference in New Issue