diff options
| author | Dustin Mierau <dustin@mierau.me> | 2023-12-22 18:18:23 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2023-12-22 18:18:23 -0800 |
| commit | b9443172e78669b78d3bd3fa4f20e1b202d9c741 (patch) | |
| tree | 0bfe7a307e569e57296d3666385667329a6d5d8a /Hotline | |
| parent | ecf1f38892d3cac2eb8e7c04d8afb80664b80a54 (diff) | |
Fix issue where some servers mark transactions with isReply field but not as a reply transaction type.
Diffstat (limited to 'Hotline')
| -rw-r--r-- | Hotline/Hotline/HotlineClient.swift | 10 | ||||
| -rw-r--r-- | Hotline/macOS/ChatView.swift | 2 | ||||
| -rw-r--r-- | Hotline/macOS/FilesView.swift | 20 | ||||
| -rw-r--r-- | Hotline/macOS/ServerView.swift | 3 |
4 files changed, 25 insertions, 10 deletions
diff --git a/Hotline/Hotline/HotlineClient.swift b/Hotline/Hotline/HotlineClient.swift index d7d4c9e..bbaec5b 100644 --- a/Hotline/Hotline/HotlineClient.swift +++ b/Hotline/Hotline/HotlineClient.swift @@ -418,7 +418,7 @@ class HotlineClient { t.setFieldEncodedString(type: .userPassword, val: password) t.setFieldUInt16(type: .userIconID, val: iconID) t.setFieldString(type: .userName, val: username) - t.setFieldUInt32(type: .versionNumber, val: 150) + t.setFieldUInt32(type: .versionNumber, val: 123) self.sendTransaction(t) { success in if !success { @@ -722,7 +722,7 @@ class HotlineClient { } private func processTransaction(_ transaction: HotlineTransaction) { - if transaction.type == .reply || self.transactionLog[transaction.id] != nil { + if transaction.type == .reply || transaction.isReply == 1 { print("HotlineClient <= \(transaction.type) to \(transaction.id):") print(transaction) } @@ -730,10 +730,14 @@ class HotlineClient { print("HotlineClient <= \(transaction.type) \(transaction.id)") } - if self.transactionLog[transaction.id] != nil { + if transaction.isReply == 1 { self.processReply(transaction) return } +// if self.transactionLog[transaction.id] != nil { +// self.processReply(transaction) +// return +// } switch(transaction.type) { case .reply: diff --git a/Hotline/macOS/ChatView.swift b/Hotline/macOS/ChatView.swift index f16ac8b..2b6d10b 100644 --- a/Hotline/macOS/ChatView.swift +++ b/Hotline/macOS/ChatView.swift @@ -51,7 +51,7 @@ struct ChatView: View { .padding(16) } .scrollBounceBehavior(.basedOnSize) - .frame(maxHeight: 325) + .frame(maxHeight: 375) // Divider() // diff --git a/Hotline/macOS/FilesView.swift b/Hotline/macOS/FilesView.swift index ee5a310..771836d 100644 --- a/Hotline/macOS/FilesView.swift +++ b/Hotline/macOS/FilesView.swift @@ -163,12 +163,14 @@ struct FilesView: View { } } .toolbar { + + ToolbarItem(placement: .primaryAction) { Button { } label: { - Label("Download File", systemImage: "square.and.arrow.down") + Label("Delete File", systemImage: "trash") } - .help("Download") + .help("Delete") } ToolbarItem(placement: .primaryAction) { @@ -176,15 +178,23 @@ struct FilesView: View { } label: { Label("Preview File", systemImage: "eye") } - .help("Preview") + .help("Preview File") } ToolbarItem(placement: .primaryAction) { Button { } label: { - Label("Delete File", systemImage: "trash") + Label("Get File Info", systemImage: "info.circle") } - .help("Delete") + .help("Get File Info") + } + + ToolbarItem(placement: .primaryAction) { + Button { + } label: { + Label("Download File", systemImage: "square.and.arrow.down") + } + .help("Download") } } } diff --git a/Hotline/macOS/ServerView.swift b/Hotline/macOS/ServerView.swift index da5716f..7476b3c 100644 --- a/Hotline/macOS/ServerView.swift +++ b/Hotline/macOS/ServerView.swift @@ -252,13 +252,14 @@ struct ServerView: View { } .navigationTitle("") .onAppear { + print(" YAYY") self.model.login(server: self.server, login: "", password: "", username: "bolt", iconID: 128) { success in if !success { print("FAILED LOGIN??") } else { - self.model.sendUserInfo(username: "bolt", iconID: 128) print("GETTING USER LIST????!") + self.model.sendUserInfo(username: "bolt", iconID: 128) self.model.getUserList() } } |