another.im-ios/ConversationsClassic/View/RootView.swift
2024-10-15 13:39:23 +02:00

26 lines
704 B
Swift

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