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:
Jyrki Gadinger 2025-09-17 19:12:34 +02:00
parent c46ed208b7
commit 255a1119ed
2 changed files with 7 additions and 5 deletions

View File

@ -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);

View File

@ -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;