aboutsummaryrefslogtreecommitdiff
path: root/Hotline/macOS/ServerView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Hotline/macOS/ServerView.swift')
-rw-r--r--Hotline/macOS/ServerView.swift8
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)