aboutsummaryrefslogtreecommitdiff
path: root/Hotline/Models/Hotline.swift
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2023-12-24 12:10:02 -0800
committerDustin Mierau <dustin@mierau.me>2023-12-24 12:10:02 -0800
commita4cbaea0b12b7dd42133b4bd14f1371f1000fcc0 (patch)
treee09e601d0d41024e9ed8c49c2b2c53a996cb7297 /Hotline/Models/Hotline.swift
parente2eccde99075d2ca355a80bbbb7a3160d766b920 (diff)
New Preferences window on macOS with support for changing some basic moderation settings, plus username (finally) and user icon.1.0beta
Diffstat (limited to 'Hotline/Models/Hotline.swift')
-rw-r--r--Hotline/Models/Hotline.swift14
1 files changed, 10 insertions, 4 deletions
diff --git a/Hotline/Models/Hotline.swift b/Hotline/Models/Hotline.swift
index 229f085..6aafdfe 100644
--- a/Hotline/Models/Hotline.swift
+++ b/Hotline/Models/Hotline.swift
@@ -71,6 +71,12 @@ import SwiftUI
2561: "πŸ‡ΈπŸ‡ͺ",
]
+// @AppStorage("username") private var username: String = "guest"
+// @AppStorage("refuse private messages") private var refusePrivateMessages = false
+// @AppStorage("refuse private chat") private var refusePrivateChat = false
+// @AppStorage("enable automatic response") private var enableAutomaticResponse = false
+// @AppStorage("automatic response") private var automaticResponse = ""
+
var status: HotlineClientStatus = .disconnected
var server: Server? {
@@ -89,8 +95,8 @@ import SwiftUI
}
}
var serverTitle: String = "Server"
- var username: String = "bolt"
- var iconID: UInt = 414
+ var username: String = "guest"
+ var iconID: Int = 414
var access: HotlineUserAccessOptions?
var agreed: Bool = false
@@ -141,7 +147,7 @@ import SwiftUI
self.trackerClient.disconnect()
}
- @MainActor func login(server: Server, login: String, password: String, username: String, iconID: UInt, callback: ((Bool) -> Void)? = nil) {
+ @MainActor func login(server: Server, login: String, password: String, username: String, iconID: Int, callback: ((Bool) -> Void)? = nil) {
self.server = server
self.serverName = server.name
self.username = username
@@ -157,7 +163,7 @@ import SwiftUI
}
}
- @MainActor func sendUserInfo(username: String, iconID: UInt, options: HotlineUserOptions = [], autoresponse: String? = nil, callback: ((Bool) -> Void)? = nil) {
+ @MainActor func sendUserInfo(username: String, iconID: Int, options: HotlineUserOptions = [], autoresponse: String? = nil, callback: ((Bool) -> Void)? = nil) {
self.username = username
self.iconID = iconID