mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
fix(macOS): use correct ID for VFS enabled checks
This resolves the status of the tray icon being stuck in a "Paused" state. While the file provider domain now uses a UUID internally, the enabledAccounts array stored in the UserDefaults contains the accounts with the username+host+port string. Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
This commit is contained in:
parent
c46ed208b7
commit
255a1119ed
@ -309,12 +309,14 @@ void ownCloudGui::slotComputeOverallSyncStatus()
|
||||
|
||||
if (Mac::FileProvider::fileProviderAvailable()) {
|
||||
for (const auto &accountState : AccountManager::instance()->accounts()) {
|
||||
const auto accountFpId = Mac::FileProviderDomainManager::fileProviderDomainIdentifierFromAccountState(accountState);
|
||||
if (!Mac::FileProviderSettingsController::instance()->vfsEnabledForAccount(accountFpId)) {
|
||||
const auto account = accountState->account();
|
||||
const auto userIdAtHostWithPort = account->userIdAtHostWithPort();
|
||||
if (!Mac::FileProviderSettingsController::instance()->vfsEnabledForAccount(userIdAtHostWithPort)) {
|
||||
continue;
|
||||
}
|
||||
allPaused = false;
|
||||
const auto fileProvider = Mac::FileProvider::instance();
|
||||
const auto accountFpId = Mac::FileProviderDomainManager::fileProviderDomainIdentifierFromAccountState(accountState);
|
||||
|
||||
if (!fileProvider->xpc()->fileProviderDomainReachable(accountFpId)) {
|
||||
problemFileProviderAccounts.append(accountFpId);
|
||||
|
||||
@ -435,9 +435,9 @@ void SyncStatusSummary::initSyncState()
|
||||
|
||||
#ifdef BUILD_FILE_PROVIDER_MODULE
|
||||
if (Mac::FileProvider::fileProviderAvailable() && _accountState) {
|
||||
const auto accountFpId = Mac::FileProviderDomainManager::fileProviderDomainIdentifierFromAccountState(_accountState);
|
||||
if (Mac::FileProviderSettingsController::instance()->vfsEnabledForAccount(accountFpId)) {
|
||||
const auto account = _accountState->account();
|
||||
const auto account = _accountState->account();
|
||||
const auto userIdAtHostWithPort = account->userIdAtHostWithPort();
|
||||
if (Mac::FileProviderSettingsController::instance()->vfsEnabledForAccount(userIdAtHostWithPort)) {
|
||||
const auto lastKnownSyncState = Mac::FileProvider::instance()->socketServer()->latestReceivedSyncStatusForAccount(account);
|
||||
onFileProviderDomainSyncStateChanged(account, lastKnownSyncState);
|
||||
syncStateFallbackNeeded = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user