mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 21:05:44 +03:00
Instantiate and hook up FileProviderFastEnumerationSettings within FileProviderSettings
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
23ef72c472
commit
6e55c84d18
1 changed files with 35 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue