From e8791fb3cfba72217f888bc4bea046d346f0c562 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 28 Mar 2022 11:59:54 +0100 Subject: [PATCH] renaming reset action to also capture registering along with login --- .../im/vector/app/features/onboarding/OnboardingAction.kt | 2 +- .../vector/app/features/onboarding/OnboardingViewModel.kt | 6 +++--- .../features/onboarding/ftueauth/FtueAuthCaptchaFragment.kt | 2 +- .../onboarding/ftueauth/FtueAuthCombinedSignUpFragment.kt | 2 +- .../ftueauth/FtueAuthGenericTextInputFormFragment.kt | 2 +- .../features/onboarding/ftueauth/FtueAuthLoginFragment.kt | 2 +- .../onboarding/ftueauth/FtueAuthWaitForEmailFragment.kt | 2 +- .../app/features/onboarding/ftueauth/FtueAuthWebFragment.kt | 2 +- .../onboarding/ftueauth/terms/FtueAuthTermsFragment.kt | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/onboarding/OnboardingAction.kt b/vector/src/main/java/im/vector/app/features/onboarding/OnboardingAction.kt index 83112d380a..7510f23584 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/OnboardingAction.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/OnboardingAction.kt @@ -52,7 +52,7 @@ sealed interface OnboardingAction : VectorViewModelAction { object ResetHomeServerType : ResetAction object ResetHomeServerUrl : ResetAction object ResetSignMode : ResetAction - object ResetLogin : ResetAction + object ResetAuthenticationAttempt : ResetAction object ResetResetPassword : ResetAction // Homeserver history diff --git a/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt b/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt index e9c33d18d6..3546f2c935 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt @@ -313,7 +313,7 @@ class OnboardingViewModel @AssistedInject constructor( } } } - OnboardingAction.ResetSignMode -> { + OnboardingAction.ResetSignMode -> { setState { copy( isLoading = false, @@ -323,13 +323,13 @@ class OnboardingViewModel @AssistedInject constructor( ) } } - OnboardingAction.ResetLogin -> { + OnboardingAction.ResetAuthenticationAttempt -> { viewModelScope.launch { authenticationService.cancelPendingLoginOrRegistration() setState { copy(isLoading = false) } } } - OnboardingAction.ResetResetPassword -> { + OnboardingAction.ResetResetPassword -> { setState { copy( isLoading = false, diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCaptchaFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCaptchaFragment.kt index 4773332138..f956343cc2 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCaptchaFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCaptchaFragment.kt @@ -191,7 +191,7 @@ class FtueAuthCaptchaFragment @Inject constructor( } override fun resetViewModel() { - viewModel.handle(OnboardingAction.ResetLogin) + viewModel.handle(OnboardingAction.ResetAuthenticationAttempt) } override fun updateWithState(state: OnboardingViewState) { diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCombinedSignUpFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCombinedSignUpFragment.kt index 31f7cd9794..f2df34220b 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCombinedSignUpFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCombinedSignUpFragment.kt @@ -160,7 +160,7 @@ class FtueAuthCombinedSignUpFragment @Inject constructor() : AbstractSSOFtueAuth ) override fun resetViewModel() { - viewModel.handle(OnboardingAction.ResetLogin) + viewModel.handle(OnboardingAction.ResetAuthenticationAttempt) } override fun onError(throwable: Throwable) { diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthGenericTextInputFormFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthGenericTextInputFormFragment.kt index 2800530152..466e141fdf 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthGenericTextInputFormFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthGenericTextInputFormFragment.kt @@ -254,6 +254,6 @@ class FtueAuthGenericTextInputFormFragment @Inject constructor() : AbstractFtueA } override fun resetViewModel() { - viewModel.handle(OnboardingAction.ResetLogin) + viewModel.handle(OnboardingAction.ResetAuthenticationAttempt) } } diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthLoginFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthLoginFragment.kt index 53c9fd4fcc..527894f665 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthLoginFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthLoginFragment.kt @@ -254,7 +254,7 @@ class FtueAuthLoginFragment @Inject constructor() : AbstractSSOFtueAuthFragment< } override fun resetViewModel() { - viewModel.handle(OnboardingAction.ResetLogin) + viewModel.handle(OnboardingAction.ResetAuthenticationAttempt) } override fun onError(throwable: Throwable) { diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthWaitForEmailFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthWaitForEmailFragment.kt index ec72f52b9e..6056cd30d3 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthWaitForEmailFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthWaitForEmailFragment.kt @@ -78,6 +78,6 @@ class FtueAuthWaitForEmailFragment @Inject constructor() : AbstractFtueAuthFragm } override fun resetViewModel() { - viewModel.handle(OnboardingAction.ResetLogin) + viewModel.handle(OnboardingAction.ResetAuthenticationAttempt) } } diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthWebFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthWebFragment.kt index 4c99a4d1d8..69b002c271 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthWebFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthWebFragment.kt @@ -235,7 +235,7 @@ class FtueAuthWebFragment @Inject constructor( } override fun resetViewModel() { - viewModel.handle(OnboardingAction.ResetLogin) + viewModel.handle(OnboardingAction.ResetAuthenticationAttempt) } override fun onBackPressed(toolbarButton: Boolean): Boolean { diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/terms/FtueAuthTermsFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/terms/FtueAuthTermsFragment.kt index 03598d3a47..f6a7769cbd 100755 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/terms/FtueAuthTermsFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/terms/FtueAuthTermsFragment.kt @@ -121,6 +121,6 @@ class FtueAuthTermsFragment @Inject constructor( } override fun resetViewModel() { - viewModel.handle(OnboardingAction.ResetLogin) + viewModel.handle(OnboardingAction.ResetAuthenticationAttempt) } }