mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-22 23:30:24 +01:00
adding reset use case action, is todo until the persistence is implemented
This commit is contained in:
parent
c3a7f6e7c8
commit
f3cc7e9f0b
@ -32,6 +32,7 @@ sealed class OnboardingAction : VectorViewModelAction {
|
||||
data class UpdateServerType(val serverType: ServerType) : OnboardingAction()
|
||||
data class UpdateHomeServer(val homeServerUrl: String) : OnboardingAction()
|
||||
data class UpdateUseCase(val useCase: FtueUseCase) : OnboardingAction()
|
||||
object ResetUseCase : OnboardingAction()
|
||||
data class UpdateSignMode(val signMode: SignMode) : OnboardingAction()
|
||||
data class LoginWithToken(val loginToken: String) : OnboardingAction()
|
||||
data class WebLoginSuccess(val credentials: Credentials) : OnboardingAction()
|
||||
|
@ -126,6 +126,7 @@ class OnboardingViewModel @AssistedInject constructor(
|
||||
is OnboardingAction.OnGetStarted -> handleSplashAction(action.resetLoginConfig, action.onboardingFlow)
|
||||
is OnboardingAction.OnIAlreadyHaveAnAccount -> handleSplashAction(action.resetLoginConfig, action.onboardingFlow)
|
||||
is OnboardingAction.UpdateUseCase -> handleUpdateUseCase()
|
||||
OnboardingAction.ResetUseCase -> resetUseCase()
|
||||
is OnboardingAction.UpdateServerType -> handleUpdateServerType(action)
|
||||
is OnboardingAction.UpdateSignMode -> handleUpdateSignMode(action)
|
||||
is OnboardingAction.InitWith -> handleInitWith(action)
|
||||
@ -462,6 +463,10 @@ class OnboardingViewModel @AssistedInject constructor(
|
||||
_viewEvents.post(OnboardingViewEvents.OpenServerSelection)
|
||||
}
|
||||
|
||||
private fun resetUseCase() {
|
||||
// TODO remove stored use case
|
||||
}
|
||||
|
||||
private fun handleUpdateServerType(action: OnboardingAction.UpdateServerType) {
|
||||
setState {
|
||||
copy(
|
||||
|
@ -60,7 +60,7 @@ class FtueAuthUseCaseFragment @Inject constructor() : AbstractFtueAuthFragment<F
|
||||
}
|
||||
|
||||
override fun resetViewModel() {
|
||||
// Nothing to do
|
||||
viewModel.handle(OnboardingAction.ResetUseCase)
|
||||
}
|
||||
|
||||
private fun TextView.setUseCase(@StringRes label: Int, useCase: FtueUseCase) {
|
||||
|
Loading…
Reference in New Issue
Block a user