mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
renaming reset action to also capture registering along with login
This commit is contained in:
parent
c3ab895a54
commit
e8791fb3cf
9 changed files with 11 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -191,7 +191,7 @@ class FtueAuthCaptchaFragment @Inject constructor(
|
|||
}
|
||||
|
||||
override fun resetViewModel() {
|
||||
viewModel.handle(OnboardingAction.ResetLogin)
|
||||
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
|
||||
}
|
||||
|
||||
override fun updateWithState(state: OnboardingViewState) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -254,6 +254,6 @@ class FtueAuthGenericTextInputFormFragment @Inject constructor() : AbstractFtueA
|
|||
}
|
||||
|
||||
override fun resetViewModel() {
|
||||
viewModel.handle(OnboardingAction.ResetLogin)
|
||||
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -78,6 +78,6 @@ class FtueAuthWaitForEmailFragment @Inject constructor() : AbstractFtueAuthFragm
|
|||
}
|
||||
|
||||
override fun resetViewModel() {
|
||||
viewModel.handle(OnboardingAction.ResetLogin)
|
||||
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -121,6 +121,6 @@ class FtueAuthTermsFragment @Inject constructor(
|
|||
}
|
||||
|
||||
override fun resetViewModel() {
|
||||
viewModel.handle(OnboardingAction.ResetLogin)
|
||||
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue