From: Claudio Cambra Date: Wed, 27 Mar 2024 11:24:54 +0000 (+0800) Subject: Make sure to emit relevant signals and set sync is paused to true if relevant X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~7^2~36 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cf5811b2f025cb5ed340eaa6560961bdc7b3ee5b;p=nextcloud-desktop.git Make sure to emit relevant signals and set sync is paused to true if relevant Signed-off-by: Claudio Cambra --- diff --git a/src/gui/systray.cpp b/src/gui/systray.cpp index e7b0f95d2..13823bd09 100644 --- a/src/gui/systray.cpp +++ b/src/gui/systray.cpp @@ -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()