renaming reset action to also capture registering along with login

This commit is contained in:
Adam Brown 2022-03-28 11:59:54 +01:00
parent c3ab895a54
commit e8791fb3cf
9 changed files with 11 additions and 11 deletions

View file

@ -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

View file

@ -323,7 +323,7 @@ class OnboardingViewModel @AssistedInject constructor(
)
}
}
OnboardingAction.ResetLogin -> {
OnboardingAction.ResetAuthenticationAttempt -> {
viewModelScope.launch {
authenticationService.cancelPendingLoginOrRegistration()
setState { copy(isLoading = false) }

View file

@ -191,7 +191,7 @@ class FtueAuthCaptchaFragment @Inject constructor(
}
override fun resetViewModel() {
viewModel.handle(OnboardingAction.ResetLogin)
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
}
override fun updateWithState(state: OnboardingViewState) {

View file

@ -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) {

View file

@ -254,6 +254,6 @@ class FtueAuthGenericTextInputFormFragment @Inject constructor() : AbstractFtueA
}
override fun resetViewModel() {
viewModel.handle(OnboardingAction.ResetLogin)
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
}
}

View file

@ -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) {

View file

@ -78,6 +78,6 @@ class FtueAuthWaitForEmailFragment @Inject constructor() : AbstractFtueAuthFragm
}
override fun resetViewModel() {
viewModel.handle(OnboardingAction.ResetLogin)
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
}
}

View file

@ -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 {

View file

@ -121,6 +121,6 @@ class FtueAuthTermsFragment @Inject constructor(
}
override fun resetViewModel() {
viewModel.handle(OnboardingAction.ResetLogin)
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
}
}