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

26 lines
704 B
Swift
Raw Normal View History

import SwiftfulRouting
import SwiftUI
struct RootView: View {
@EnvironmentObject var clientsStore: ClientsStore
2024-10-15 11:39:23 +00:00
@EnvironmentObject var globalSettingsStore: GlobalSettingsStore
var body: some View {
Group {
if clientsStore.ready {
2024-10-15 11:39:23 +00:00
if clientsStore.clients.isEmpty || globalSettingsStore.credentials.allSatisfy({ !$0.isActive }) {
RouterView { _ in
WelcomeScreen()
}
} else {
RouterView { _ in
MainTabScreen()
}
}
} else {
StartScreen()
}
}
}
}