Skip to content

Commit c912317

Browse files
claucambramgallien
authored andcommitted
gui/tray: Present successful sync tray icon is we just have idle file provider accounts
Signed-off-by: Claudio Cambra <[email protected]>
1 parent 5e12dde commit c912317

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
@@ -313,6 +313,7 @@ void ownCloudGui::slotComputeOverallSyncStatus()
313313
QList<QString> problemFileProviderAccounts;
314314
QList<QString> syncingFileProviderAccounts;
315315
QList<QString> successFileProviderAccounts;
316+
QList<QString> idleFileProviderAccounts;
316317

317318
if (Mac::FileProvider::fileProviderAvailable()) {
318319
for (const auto &accountState : AccountManager::instance()->accounts()) {
@@ -329,6 +330,7 @@ void ownCloudGui::slotComputeOverallSyncStatus()
329330
switch (const auto latestStatus = fileProvider->socketServer()->latestReceivedSyncStatusForAccount(accountState->account())) {
330331
case SyncResult::Undefined:
331332
case SyncResult::NotYetStarted:
333+
idleFileProviderAccounts.append(accountFpId);
332334
break;
333335
case SyncResult::SyncPrepare:
334336
case SyncResult::SyncRunning:
@@ -343,7 +345,7 @@ void ownCloudGui::slotComputeOverallSyncStatus()
343345
case SyncResult::SetupError:
344346
problemFileProviderAccounts.append(accountFpId);
345347
break;
346-
case SyncResult::Paused:
348+
case SyncResult::Paused: // This is not technically possible with VFS
347349
break;
348350
}
349351
}
@@ -405,7 +407,7 @@ void ownCloudGui::slotComputeOverallSyncStatus()
405407
overallStatus != SyncResult::Error &&
406408
overallStatus != SyncResult::SetupError) {
407409
overallStatus = SyncResult::SyncRunning;
408-
} else if (!successFileProviderAccounts.isEmpty() &&
410+
} else if ((!successFileProviderAccounts.isEmpty() || (problemFileProviderAccounts.isEmpty() && syncingFileProviderAccounts.isEmpty() && !idleFileProviderAccounts.isEmpty())) &&
409411
overallStatus != SyncResult::SyncRunning &&
410412
overallStatus != SyncResult::Problem &&
411413
overallStatus != SyncResult::Error &&

0 commit comments

Comments
 (0)