mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-29 06:28:45 +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 ResetHomeServerType : ResetAction
|
||||||
object ResetHomeServerUrl : ResetAction
|
object ResetHomeServerUrl : ResetAction
|
||||||
object ResetSignMode : ResetAction
|
object ResetSignMode : ResetAction
|
||||||
object ResetLogin : ResetAction
|
object ResetAuthenticationAttempt : ResetAction
|
||||||
object ResetResetPassword : ResetAction
|
object ResetResetPassword : ResetAction
|
||||||
|
|
||||||
// Homeserver history
|
// Homeserver history
|
||||||
|
|
|
@ -313,7 +313,7 @@ class OnboardingViewModel @AssistedInject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OnboardingAction.ResetSignMode -> {
|
OnboardingAction.ResetSignMode -> {
|
||||||
setState {
|
setState {
|
||||||
copy(
|
copy(
|
||||||
isLoading = false,
|
isLoading = false,
|
||||||
|
@ -323,13 +323,13 @@ class OnboardingViewModel @AssistedInject constructor(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OnboardingAction.ResetLogin -> {
|
OnboardingAction.ResetAuthenticationAttempt -> {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
authenticationService.cancelPendingLoginOrRegistration()
|
authenticationService.cancelPendingLoginOrRegistration()
|
||||||
setState { copy(isLoading = false) }
|
setState { copy(isLoading = false) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OnboardingAction.ResetResetPassword -> {
|
OnboardingAction.ResetResetPassword -> {
|
||||||
setState {
|
setState {
|
||||||
copy(
|
copy(
|
||||||
isLoading = false,
|
isLoading = false,
|
||||||
|
|
|
@ -191,7 +191,7 @@ class FtueAuthCaptchaFragment @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun resetViewModel() {
|
override fun resetViewModel() {
|
||||||
viewModel.handle(OnboardingAction.ResetLogin)
|
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun updateWithState(state: OnboardingViewState) {
|
override fun updateWithState(state: OnboardingViewState) {
|
||||||
|
|
|
@ -160,7 +160,7 @@ class FtueAuthCombinedSignUpFragment @Inject constructor() : AbstractSSOFtueAuth
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun resetViewModel() {
|
override fun resetViewModel() {
|
||||||
viewModel.handle(OnboardingAction.ResetLogin)
|
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(throwable: Throwable) {
|
override fun onError(throwable: Throwable) {
|
||||||
|
|
|
@ -254,6 +254,6 @@ class FtueAuthGenericTextInputFormFragment @Inject constructor() : AbstractFtueA
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun resetViewModel() {
|
override fun resetViewModel() {
|
||||||
viewModel.handle(OnboardingAction.ResetLogin)
|
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,7 +254,7 @@ class FtueAuthLoginFragment @Inject constructor() : AbstractSSOFtueAuthFragment<
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun resetViewModel() {
|
override fun resetViewModel() {
|
||||||
viewModel.handle(OnboardingAction.ResetLogin)
|
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(throwable: Throwable) {
|
override fun onError(throwable: Throwable) {
|
||||||
|
|
|
@ -78,6 +78,6 @@ class FtueAuthWaitForEmailFragment @Inject constructor() : AbstractFtueAuthFragm
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun resetViewModel() {
|
override fun resetViewModel() {
|
||||||
viewModel.handle(OnboardingAction.ResetLogin)
|
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,7 +235,7 @@ class FtueAuthWebFragment @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun resetViewModel() {
|
override fun resetViewModel() {
|
||||||
viewModel.handle(OnboardingAction.ResetLogin)
|
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBackPressed(toolbarButton: Boolean): Boolean {
|
override fun onBackPressed(toolbarButton: Boolean): Boolean {
|
||||||
|
|
|
@ -121,6 +121,6 @@ class FtueAuthTermsFragment @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun resetViewModel() {
|
override fun resetViewModel() {
|
||||||
viewModel.handle(OnboardingAction.ResetLogin)
|
viewModel.handle(OnboardingAction.ResetAuthenticationAttempt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue