IceCubesApp/IceCubesApp/App/IceCubesApp.swift
Thomas Ricouard 3d7042832e Open HashTag
2022-12-20 15:37:51 +01:00

35 lines
809 B
Swift

import SwiftUI
import Timeline
import Network
import KeychainSwift
@main
struct IceCubesApp: App {
public static let defaultServer = "mastodon.social"
@StateObject private var appAccountsManager = AppAccountsManager()
var body: some Scene {
WindowGroup {
TabView {
TimelineTab()
.tabItem {
Label("Home", systemImage: "globe")
}
if appAccountsManager.currentClient.isAuth {
NotificationsTab()
.tabItem {
Label("Notifications", systemImage: "bell")
}
}
SettingsTabs()
.tabItem {
Label("Settings", systemImage: "gear")
}
}
.environmentObject(appAccountsManager)
.environmentObject(appAccountsManager.currentClient)
}
}
}