From 534b3a60d771f4af728609df154604d8f803abb9 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 5 Feb 2024 18:30:25 +0800 Subject: [PATCH] Add fastEnumerationEnabled property to config Signed-off-by: Claudio Cambra --- .../FileProviderExt/FileProviderConfig.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderConfig.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderConfig.swift index 3b827984d..53e4d7890 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderConfig.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderConfig.swift @@ -9,7 +9,7 @@ import FileProvider import Foundation struct FileProviderConfig { - enum FileProviderConfigKey: String { + private enum ConfigKey: String { case fastEnumerationEnabled = "fastEnumerationEnabled" } @@ -30,4 +30,9 @@ struct FileProviderConfig { defaults.setValue(newValue, forKey: domainIdentifier.rawValue) } } + + var fastEnumerationEnabled: Bool { + get { internalConfig[ConfigKey.fastEnumerationEnabled.rawValue] as? Bool ?? true } + set { internalConfig[ConfigKey.fastEnumerationEnabled.rawValue] = newValue } + } } -- 2.30.2