From ac3c8f540751e4138319d9e4e7ffb92a9b2236e2 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Tue, 14 May 2024 18:12:56 -0700 Subject: Some contextual menus in files and newsgroups. Added functional delete file context menu. --- Hotline/Models/Hotline.swift | 72 +++++++++++--------------------------------- 1 file changed, 18 insertions(+), 54 deletions(-) (limited to 'Hotline/Models') diff --git a/Hotline/Models/Hotline.swift b/Hotline/Models/Hotline.swift index 06baf04..ce917cd 100644 --- a/Hotline/Models/Hotline.swift +++ b/Hotline/Models/Hotline.swift @@ -545,14 +545,29 @@ class Hotline: Equatable, HotlineClientDelegate, HotlineFileClientDelegate { } } - @MainActor func fileDetails(_ fileName: String, path: [String], complete callback: ((FileDetails?) -> Void)? = nil) { + @MainActor func getFileDetails(_ fileName: String, path: [String]) async -> FileDetails? { var fullPath: [String] = [] if path.count > 1 { fullPath = Array(path[0.. Bool { + var fullPath: [String] = [] + if path.count > 1 { + fullPath = Array(path[0.. Void)? = nil) { -// var fullPath: [String] = [] -// if path.count > 1 { -// fullPath = Array(path[0..