conversations-classic-ios/ConversationsClassic/View/BaseNavigationView.swift

40 lines
915 B
Swift
Raw Normal View History

2024-06-19 15:15:27 +00:00
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()
2024-06-21 10:42:50 +00:00
case .conversation:
ConversationScreen()
2024-06-19 15:15:27 +00:00
}
}
}
}