From 5e12dde6ca9e1171504dc9b61de4158c8a3d7cbf Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Fri, 7 Feb 2025 10:08:53 +0800 Subject: [PATCH 1/2] gui/tray: If there are successfully synced file provide raccounts do not present "problem" sync icon Signed-off-by: Claudio Cambra --- src/gui/owncloudgui.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index 9a107f5eb7588..f383266479114 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -405,6 +405,12 @@ void ownCloudGui::slotComputeOverallSyncStatus() overallStatus != SyncResult::Error && overallStatus != SyncResult::SetupError) { overallStatus = SyncResult::SyncRunning; + } else if (!successFileProviderAccounts.isEmpty() && + overallStatus != SyncResult::SyncRunning && + overallStatus != SyncResult::Problem && + overallStatus != SyncResult::Error && + overallStatus != SyncResult::SetupError) { + overallStatus = SyncResult::Success; } #endif From c9123179479233132a7f9b2216b5c99303e7efbe Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Fri, 7 Feb 2025 10:09:30 +0800 Subject: [PATCH 2/2] gui/tray: Present successful sync tray icon is we just have idle file provider accounts Signed-off-by: Claudio Cambra --- src/gui/owncloudgui.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index f383266479114..872635352bb56 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -313,6 +313,7 @@ void ownCloudGui::slotComputeOverallSyncStatus() QList problemFileProviderAccounts; QList syncingFileProviderAccounts; QList successFileProviderAccounts; + QList idleFileProviderAccounts; if (Mac::FileProvider::fileProviderAvailable()) { for (const auto &accountState : AccountManager::instance()->accounts()) { @@ -329,6 +330,7 @@ void ownCloudGui::slotComputeOverallSyncStatus() switch (const auto latestStatus = fileProvider->socketServer()->latestReceivedSyncStatusForAccount(accountState->account())) { case SyncResult::Undefined: case SyncResult::NotYetStarted: + idleFileProviderAccounts.append(accountFpId); break; case SyncResult::SyncPrepare: case SyncResult::SyncRunning: @@ -343,7 +345,7 @@ void ownCloudGui::slotComputeOverallSyncStatus() case SyncResult::SetupError: problemFileProviderAccounts.append(accountFpId); break; - case SyncResult::Paused: + case SyncResult::Paused: // This is not technically possible with VFS break; } } @@ -405,7 +407,7 @@ void ownCloudGui::slotComputeOverallSyncStatus() overallStatus != SyncResult::Error && overallStatus != SyncResult::SetupError) { overallStatus = SyncResult::SyncRunning; - } else if (!successFileProviderAccounts.isEmpty() && + } else if ((!successFileProviderAccounts.isEmpty() || (problemFileProviderAccounts.isEmpty() && syncingFileProviderAccounts.isEmpty() && !idleFileProviderAccounts.isEmpty())) && overallStatus != SyncResult::SyncRunning && overallStatus != SyncResult::Problem && overallStatus != SyncResult::Error &&