Ensure calls are made via main actor to delegate in share table view data source
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 28 Feb 2024 13:57:23 +0000 (21:57 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 17 Apr 2024 08:38:53 +0000 (16:38 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareTableViewDataSource.swift

index 52360ada1b1326f4c13ebc1596071b32f345dc5c..38c14a979e2781a48297fcb292f304f875eeaedb 100644 (file)
@@ -157,10 +157,10 @@ class ShareTableViewDataSource: NSObject, NSTableViewDataSource, NSTableViewDele
 
     @objc func tableViewSelectionDidChange(_ notification: Notification) {
         guard let selectedRow = sharesTableView?.selectedRow, selectedRow >= 0 else {
-            uiDelegate?.hideOptions()
+            Task { @MainActor in uiDelegate?.hideOptions() }
             return
         }
         let share = shares[selectedRow]
-        uiDelegate?.showOptions(share: share)
+        Task { @MainActor in uiDelegate?.showOptions(share: share) }
     }
 }