Skip to content

Commit

Permalink
Make sure to emit relevant signals and set sync is paused to true if …
Browse files Browse the repository at this point in the history
…relevant

Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Mar 27, 2024
1 parent 86ecc74 commit 87361f0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/gui/systray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,17 @@ void Systray::slotCurrentUserChanged()
void Systray::slotUpdateSyncPausedState()
{
const auto folderMap = FolderMan::instance()->map();
for (const auto *folder : folderMap) {
for (const auto folder : folderMap) {
connect(folder, &Folder::syncPausedChanged, this, &Systray::slotUpdateSyncPausedState, Qt::UniqueConnection);
if (!folder->syncPaused()) {
_syncIsPaused = false;
break;
emit syncIsPausedChanged();
return;
}
}

_syncIsPaused = true;
emit syncIsPausedChanged();
}

void Systray::slotUnpauseAllFolders()
Expand Down

0 comments on commit 87361f0

Please sign in to comment.