Add a state machine to the AuthenticationFlowCoordinator. (#4103)

This commit is contained in:
Doug
2025-05-08 15:41:52 +01:00
committed by GitHub
parent d77bad61dd
commit 489f784640
6 changed files with 221 additions and 39 deletions
@@ -10,15 +10,15 @@ import SwiftUI
// MARK: - Coordinator
enum AuthenticationStartScreenCoordinatorAction {
case loginManually
case loginWithQR
case loginManually
case register
case reportProblem
}
enum AuthenticationStartScreenViewModelAction {
case loginManually
case loginWithQR
case loginManually
case register
case reportProblem
}
@@ -30,8 +30,8 @@ struct AuthenticationStartScreenViewState: BindableState {
}
enum AuthenticationStartScreenViewAction {
case loginManually
case loginWithQR
case loginManually
case register
case reportProblem
}
@@ -25,10 +25,10 @@ class AuthenticationStartScreenViewModel: AuthenticationStartScreenViewModelType
override func process(viewAction: AuthenticationStartScreenViewAction) {
switch viewAction {
case .loginManually:
actionsSubject.send(.loginManually)
case .loginWithQR:
actionsSubject.send(.loginWithQR)
case .loginManually:
actionsSubject.send(.loginManually)
case .register:
actionsSubject.send(.register)
case .reportProblem: