Skip to content

Commit 00946f3

Browse files
committed
gui/tray: Present successful sync tray icon is we just have idle file provider accounts
Signed-off-by: Claudio Cambra <[email protected]>
1 parent a7c3902 commit 00946f3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/gui/owncloudgui.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ void ownCloudGui::slotComputeOverallSyncStatus()
312312
QList<QString> problemFileProviderAccounts;
313313
QList<QString> syncingFileProviderAccounts;
314314
QList<QString> successFileProviderAccounts;
315+
QList<QString> idleFileProviderAccounts;
315316

316317
if (Mac::FileProvider::fileProviderAvailable()) {
317318
for (const auto &accountState : AccountManager::instance()->accounts()) {
@@ -328,6 +329,7 @@ void ownCloudGui::slotComputeOverallSyncStatus()
328329
switch (const auto latestStatus = fileProvider->socketServer()->latestReceivedSyncStatusForAccount(accountState->account())) {
329330
case SyncResult::Undefined:
330331
case SyncResult::NotYetStarted:
332+
idleFileProviderAccounts.append(accountFpId);
331333
break;
332334
case SyncResult::SyncPrepare:
333335
case SyncResult::SyncRunning:
@@ -342,7 +344,7 @@ void ownCloudGui::slotComputeOverallSyncStatus()
342344
case SyncResult::SetupError:
343345
problemFileProviderAccounts.append(accountFpId);
344346
break;
345-
case SyncResult::Paused:
347+
case SyncResult::Paused: // This is not technically possible with VFS
346348
break;
347349
}
348350
}
@@ -404,7 +406,7 @@ void ownCloudGui::slotComputeOverallSyncStatus()
404406
overallStatus != SyncResult::Error &&
405407
overallStatus != SyncResult::SetupError) {
406408
overallStatus = SyncResult::SyncRunning;
407-
} else if (!successFileProviderAccounts.isEmpty() &&
409+
} else if ((!successFileProviderAccounts.isEmpty() || (problemFileProviderAccounts.isEmpty() && syncingFileProviderAccounts.isEmpty() && !idleFileProviderAccounts.isEmpty())) &&
408410
overallStatus != SyncResult::SyncRunning &&
409411
overallStatus != SyncResult::Problem &&
410412
overallStatus != SyncResult::Error &&

0 commit comments

Comments
 (0)