mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 04:55:48 +03:00
Add method to check if fast enumeration setting has been set in settings controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
5eb333cb8d
commit
23c1e554d0
2 changed files with 13 additions and 0 deletions
|
@ -45,6 +45,7 @@ public:
|
|||
[[nodiscard]] unsigned long long remoteStorageUsageForAccount(const QString &userIdAtHost) const;
|
||||
[[nodiscard]] Q_INVOKABLE float remoteStorageUsageGbForAccount(const QString &userIdAtHost) const;
|
||||
[[nodiscard]] Q_INVOKABLE bool fastEnumerationEnabledForAccount(const QString &userIdAtHost) const;
|
||||
[[nodiscard]] Q_INVOKABLE bool fastEnumerationSetForAccount(const QString &userIdAtHost) const;
|
||||
|
||||
[[nodiscard]] Q_INVOKABLE QAbstractListModel *materialisedItemsModelForAccount(const QString &userIdAtHost);
|
||||
[[nodiscard]] Q_INVOKABLE FileProviderDomainSyncStatus *domainSyncStatusForAccount(const QString &userIdAtHost) const;
|
||||
|
|
|
@ -362,6 +362,18 @@ void FileProviderSettingsController::setVfsEnabledForAccount(const QString &user
|
|||
}
|
||||
}
|
||||
|
||||
bool FileProviderSettingsController::fastEnumerationSetForAccount(const QString &userIdAtHost) const
|
||||
{
|
||||
const auto xpc = FileProvider::instance()->xpc();
|
||||
if (!xpc) {
|
||||
return false;
|
||||
}
|
||||
if (const auto state = xpc->fastEnumerationStateForExtension(userIdAtHost)) {
|
||||
return state->second;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FileProviderSettingsController::fastEnumerationEnabledForAccount(const QString &userIdAtHost) const
|
||||
{
|
||||
const auto xpc = FileProvider::instance()->xpc();
|
||||
|
|
Loading…
Reference in a new issue