another.im-ios/ConversationsClassic/View/RootView.swift

28 lines
639 B
Swift
Raw Normal View History

2024-08-11 15:04:42 +00:00
import SwiftfulRouting
import SwiftUI
struct RootView: View {
@EnvironmentObject var clientsStore: ClientsStore
var body: some View {
Group {
if clientsStore.ready {
if clientsStore.clients.isEmpty {
RouterView { _ in
WelcomeScreen()
}
} else {
RouterView { _ in
MainTabScreen()
}
}
} else {
StartScreen()
}
}
.task {
clientsStore.startFetching()
}
}
}