another.im-ios/ConversationsClassic/View/BaseNavigationView.swift
2024-08-07 12:03:58 +02:00

40 lines
915 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()
case .conversation:
ConversationScreen()
}
}
}
}