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/Models/Hotline.swift | |
| parent | b9529a0d255ad41c62a4e3b93a47ebb5bb82a565 (diff) | |
New Hotline toolbar window for banner.
Diffstat (limited to 'Hotline/Models/Hotline.swift')
| -rw-r--r-- | Hotline/Models/Hotline.swift | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Hotline/Models/Hotline.swift b/Hotline/Models/Hotline.swift index f1c745f..3cc8366 100644 --- a/Hotline/Models/Hotline.swift +++ b/Hotline/Models/Hotline.swift @@ -1,10 +1,14 @@ import SwiftUI @Observable -final class Hotline: HotlineClientDelegate, HotlineFileClientDelegate { +class Hotline: Equatable, HotlineClientDelegate, HotlineFileClientDelegate { + let id: UUID = UUID() let trackerClient: HotlineTrackerClient let client: HotlineClient - let soundEffects: SoundEffectPlayer = SoundEffectPlayer() + + static func == (lhs: Hotline, rhs: Hotline) -> Bool { + return lhs.id == rhs.id + } #if os(macOS) static func getClassicIcon(_ index: Int) -> NSImage? { @@ -178,7 +182,6 @@ final class Hotline: HotlineClientDelegate, HotlineFileClientDelegate { self.iconID = iconID self.client.login(address: server.address, port: server.port, login: server.login, password: server.password, username: username, iconID: UInt16(iconID)) { [weak self] err, serverName, serverVersion in - print("Server info:", serverName, serverVersion) self?.serverVersion = serverVersion ?? 123 if serverName != nil { self?.serverName = serverName |