Add method to get state of fast enumeration setting
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Mon, 5 Feb 2024 10:42:12 +0000 (18:42 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 6 Mar 2024 10:46:41 +0000 (18:46 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/Services/ClientCommunicationProtocol.h
shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/Services/ClientCommunicationService.swift

index 47eb6c95bfec6fa502af182bf64f97744ce96cf4..481f541c5bcf45ab1f4b0ae61822332a54b4dd6b 100644 (file)
@@ -25,6 +25,7 @@
                         password:(NSString *)password;
 - (void)removeAccountConfig;
 - (void)createDebugLogStringWithCompletionHandler:(void(^)(NSString *debugLogString, NSError *error))completionHandler;
+- (void)getFastEnumerationStateWithCompletionHandler:(void(^)(BOOL enabled, BOOL set))completionHandler;
 
 @end
 
index ccdc1dc90209926c4585f6fb5824839b9fbd5362..3b93641411a54bae1b59f4d6ad419fab62564276 100644 (file)
@@ -77,4 +77,10 @@ class ClientCommunicationService: NSObject, NSFileProviderServiceSource, NSXPCLi
             completionHandler(logs.joined(separator: "\n"), nil)
         }
     }
+
+    func getFastEnumerationState(completionHandler: @escaping (Bool, Bool) -> Void) {
+        let enabled = fpExtension.config.fastEnumerationEnabled
+        let set = fpExtension.config.fastEnumerationSet
+        completionHandler(enabled, set)
+    }
 }