another.im-ios/ConversationsClassic/View/BaseNavigationView.swift
2024-06-19 17:15:27 +02:00

37 lines
845 B
Swift

import Martin
import SwiftUI
struct BaseNavigationView: View {
@EnvironmentObject var store: AppStore
public var body: some View {
Group {
switch store.state.currentFlow {
case .start:
switch store.state.startState.navigation {
case .startScreen:
StartScreen()
case .welcomeScreen:
WelcomeScreen()
}
case .accounts:
switch store.state.accountsState.navigation {
case .addAccount:
AddAccountScreen()
}
case .chats:
ChatsListScreen()
case .contacts:
ContactsScreen()
case .settings:
SettingsScreen()
}
}
}
}