From: Claudio Cambra Date: Mon, 19 Feb 2024 09:00:47 +0000 (+0800) Subject: Instantiate and hook up FileProviderFastEnumerationSettings within FileProviderSettings X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~7^2~111^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6e55c84d188f10916fb9693a04d396f3565ce47a;p=nextcloud-desktop.git Instantiate and hook up FileProviderFastEnumerationSettings within FileProviderSettings Signed-off-by: Claudio Cambra --- diff --git a/src/gui/macOS/ui/FileProviderSettings.qml b/src/gui/macOS/ui/FileProviderSettings.qml index f3844f245..c9fc2f23c 100644 --- a/src/gui/macOS/ui/FileProviderSettings.qml +++ b/src/gui/macOS/ui/FileProviderSettings.qml @@ -60,6 +60,8 @@ Page { padding: Style.standardSpacing ColumnLayout { + id: rootColumn + anchors { top: parent.top left: parent.left @@ -100,6 +102,39 @@ Page { syncStatus: root.controller.domainSyncStatusForAccount(root.accountUserIdAtHost) } + FileProviderFastEnumerationSettings { + id: fastEnumerationSettings + + Layout.fillWidth: true + + fastEnumerationSet: root.controller.fastEnumerationSetForAccount(root.accountUserIdAtHost) + fastEnumerationEnabled: root.controller.fastEnumerationEnabledForAccount(root.accountUserIdAtHost) + onFastEnumerationEnabledToggled: root.controller.setFastEnumerationEnabledForAccount(root.accountUserIdAtHost, enabled) + + padding: 0 + + Connections { + target: root.controller + + function updateFastEnumerationValues() { + fastEnumerationSettings.fastEnumerationEnabled = root.controller.fastEnumerationEnabledForAccount(root.accountUserIdAtHost); + fastEnumerationSettings.fastEnumerationSet = root.controller.fastEnumerationSetForAccount(root.accountUserIdAtHost); + } + + function onFastEnumerationEnabledForAccountChanged(accountUserIdAtHost) { + if (root.accountUserIdAtHost === accountUserIdAtHost) { + updateFastEnumerationValues(); + } + } + + function onFastEnumerationSetForAccountChanged(accountUserIdAtHost) { + if (root.accountUserIdAtHost === accountUserIdAtHost) { + updateFastEnumerationValues(); + } + } + } + } + FileProviderStorageInfo { id: storageInfo localUsedStorage: root.controller.localStorageUsageGbForAccount(root.accountUserIdAtHost)