From e23763e6db176b48f91e9d75a8bbf58b852dd993 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 29 Nov 2019 15:43:39 +0100 Subject: [PATCH] Update password from email twice --- .../java/im/vector/riotx/features/login/LoginViewModel.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 7dc8a1119b..de76f6b416 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 @@ -322,13 +322,15 @@ class LoginViewModel @AssistedInject constructor(@Assisted initialState: LoginVi if (safeLoginWizard == null) { setState { copy( - asyncResetPassword = Fail(Throwable("Bad configuration")) + asyncResetPassword = Fail(Throwable("Bad configuration")), + asyncResetMailConfirmed = Uninitialized ) } } else { setState { copy( - asyncResetPassword = Loading() + asyncResetPassword = Loading(), + asyncResetMailConfirmed = Uninitialized ) } @@ -360,12 +362,14 @@ class LoginViewModel @AssistedInject constructor(@Assisted initialState: LoginVi if (safeLoginWizard == null) { setState { copy( + asyncResetPassword = Uninitialized, asyncResetMailConfirmed = Fail(Throwable("Bad configuration")) ) } } else { setState { copy( + asyncResetPassword = Uninitialized, asyncResetMailConfirmed = Loading() ) }