Signal enumeration of locked/unlocked file
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 1 Aug 2024 09:36:35 +0000 (17:36 +0800)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Thu, 12 Sep 2024 08:15:58 +0000 (10:15 +0200)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift

index d7070fc9dc7892a842e1bd5a1c01f9ced523d6ac..f7347848afc7f01716086324e92a86f6911006d6 100644 (file)
@@ -212,6 +212,18 @@ class LockViewController: NSViewController {
                     accessibilityDescription: "checkmark.circle.fill"
                 )
                 stopIndicatingLoading()
+                if let manager = NSFileProviderManager(for: actionViewController.domain) {
+                    do {
+                        try await manager.signalEnumerator(for: itemIdentifier)
+                    } catch let error {
+                        presentError(
+                            """
+                            Could not signal lock state change in virtual file.
+                            Changes may take a while to be reflected on your Mac.
+                            Error: \(error.localizedDescription)
+                            """)
+                    }
+                }
             } else {
                 presentError("Could not lock file: \(error.errorDescription).")
             }