diff options
| author | Dustin Mierau <dustin@mierau.me> | 2024-05-22 11:40:53 -0700 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2024-05-22 11:40:53 -0700 |
| commit | c7a2970c7f17a1b19a76d9cb6addda8fb877a63a (patch) | |
| tree | 20f52495dd9e599d7b3942ba8357c79bc394822d /Hotline/Models | |
| parent | 39255f49250e3b0ccbd42661614a7c8a3e0d4fb7 (diff) | |
Redesign of Message Board post sheet. Tweaks to NewsEditor. Disable smart quotes in message board and news editor text view. Hide news section on older servers.
Diffstat (limited to 'Hotline/Models')
| -rw-r--r-- | Hotline/Models/Hotline.swift | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Hotline/Models/Hotline.swift b/Hotline/Models/Hotline.swift index ce917cd..93f1762 100644 --- a/Hotline/Models/Hotline.swift +++ b/Hotline/Models/Hotline.swift @@ -259,7 +259,7 @@ class Hotline: Equatable, HotlineClientDelegate, HotlineFileClientDelegate { @MainActor func postToMessageBoard(text: String) { self.client.sendPostMessageBoard(text: text) } - + @MainActor func getFileList(path: [String] = []) async -> [FileInfo] { return await withCheckedContinuation { [weak self] continuation in self?.client.sendGetFileList(path: path) { [weak self] files in @@ -422,6 +422,8 @@ class Hotline: Equatable, HotlineClientDelegate, HotlineFileClientDelegate { } @MainActor func postNewsArticle(title: String, body: String, at path: [String], parentID: UInt32 = 0) async -> Bool { + + return await withCheckedContinuation { [weak self] continuation in guard let client = self?.client else { continuation.resume(returning: false) |