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 authored and camilasan committed Apr 23, 2024
1 parent d497e26 commit ccf6b5a
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 ccf6b5a

Please sign in to comment.