From c7a2970c7f17a1b19a76d9cb6addda8fb877a63a Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Wed, 22 May 2024 11:40:53 -0700 Subject: 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. --- Hotline/Models/Hotline.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Hotline/Models') 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) -- cgit