From efa858a337af733db2c69d08df8bfaa5635ec093 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 27 Nov 2019 15:11:02 +0100 Subject: [PATCH] Login screens: reorder reset action for clarity --- .../riotx/features/login/LoginViewModel.kt | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt index 5ec6e98d2f..ef60541488 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt @@ -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(