From 60a3f2d29dfff945f59787f5a7786c6e78ba7bb9 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Wed, 1 May 2024 21:22:18 -0700 Subject: New Hotline toolbar window for banner. --- Hotline/Models/Hotline.swift | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Hotline/Models/Hotline.swift') 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 -- cgit