diff options
| author | Dustin Mierau <dustin@mierau.me> | 2024-05-01 21:22:18 -0700 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2024-05-01 21:32:15 -0700 |
| commit | 60a3f2d29dfff945f59787f5a7786c6e78ba7bb9 (patch) | |
| tree | e3d0aa6ae541790ea700353b0ac01fe8b4950f9f /Hotline/macOS/ServerView.swift | |
| parent | b9529a0d255ad41c62a4e3b93a47ebb5bb82a565 (diff) | |
New Hotline toolbar window for banner.
Diffstat (limited to 'Hotline/macOS/ServerView.swift')
| -rw-r--r-- | Hotline/macOS/ServerView.swift | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Hotline/macOS/ServerView.swift b/Hotline/macOS/ServerView.swift index 8176704..1892177 100644 --- a/Hotline/macOS/ServerView.swift +++ b/Hotline/macOS/ServerView.swift @@ -2,12 +2,17 @@ import SwiftUI import UniformTypeIdentifiers @Observable -class ServerState { +class ServerState: Equatable { + var id: UUID = UUID() var selection: ServerNavigationType init(selection: ServerNavigationType) { self.selection = selection } + + static func == (lhs: ServerState, rhs: ServerState) -> Bool { + return lhs.id == rhs.id + } } enum MenuItemType { @@ -121,6 +126,7 @@ struct ServerView: View { @Environment(\.dismiss) var dismiss @Environment(\.colorScheme) private var colorScheme @Environment(\.controlActiveState) private var controlActiveState + @Environment(\.scenePhase) private var scenePhase @State private var model: Hotline = Hotline(trackerClient: HotlineTrackerClient(), client: HotlineClient()) @State private var state: ServerState = ServerState(selection: .chat) |