From: Claudio Cambra Date: Mon, 5 Feb 2024 10:30:25 +0000 (+0800) Subject: Add fastEnumerationEnabled property to config X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~7^2~111^2~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=534b3a60d771f4af728609df154604d8f803abb9;p=nextcloud-desktop.git Add fastEnumerationEnabled property to config Signed-off-by: Claudio Cambra --- 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 } + } }