48 lines
1.2 KiB
Swift
48 lines
1.2 KiB
Swift
import SwiftUI
|
|
|
|
struct AppRootView: View {
|
|
@EnvironmentObject var navigation: NavigationStore
|
|
|
|
var body: some View {
|
|
Group {
|
|
switch navigation.flow {
|
|
case .start:
|
|
StartScreen()
|
|
|
|
case .entering(let kind):
|
|
switch kind {
|
|
case .welcome:
|
|
WelcomeScreen()
|
|
|
|
case .login:
|
|
LoginScreen()
|
|
|
|
case .registration:
|
|
RegistrationScreen()
|
|
}
|
|
|
|
case .main(let main):
|
|
switch main {
|
|
case .contacts(let kind):
|
|
switch kind {
|
|
case .list:
|
|
ContactsScreen()
|
|
|
|
case .add:
|
|
ContactsScreen()
|
|
.fullScreenCover(isPresented: .constant(true)) {
|
|
AddContactOrChannelScreen()
|
|
}
|
|
}
|
|
|
|
case .conversations:
|
|
EmptyView()
|
|
|
|
case .settings:
|
|
EmptyView()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|