diff options
| author | Dustin Mierau <dustin@mierau.me> | 2025-10-20 22:15:48 -0700 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2025-10-20 22:15:48 -0700 |
| commit | ede41868962ffed386b0da694d14cdfe6cfdb34f (patch) | |
| tree | f0b91edd1d9c1bbc23de525224b49d6f8e48e815 /Hotline/State/AppState.swift | |
| parent | 77b3ac3c051fc4e8fa126cd21e261be28f4aad1a (diff) | |
Cleanup and a bunch of work to fix issues syncing, loading, and general bookmark states in TrackerView. Added search field (substring conjunctive filter on server/bookmark names and descriptions).
Diffstat (limited to 'Hotline/State/AppState.swift')
| -rw-r--r-- | Hotline/State/AppState.swift | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Hotline/State/AppState.swift b/Hotline/State/AppState.swift new file mode 100644 index 0000000..11bae74 --- /dev/null +++ b/Hotline/State/AppState.swift @@ -0,0 +1,24 @@ +import SwiftUI + +extension EnvironmentValues { + @Entry var appState: AppState = AppState.shared +} + +@Observable +final class AppState { + static let shared = AppState() + + private init() { + + } + + var activeHotline: Hotline? = nil + var activeServerState: ServerState? = nil + + // Frontmost server window information + var activeServerID: UUID? = nil + var activeServerBanner: NSImage? = nil + var activeServerName: String? = nil + + var cloudKitReady: Bool = false +} |