Add method to get state of fast enumeration setting

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-02-05 18:42:12 +08:00
parent 9a8af68ddc
commit 8d3b676558
2 changed files with 7 additions and 0 deletions

View 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

View 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)
}
}