diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index c6f3aa66e8..22876641d3 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -79,7 +79,7 @@ ownCloudGui::ownCloudGui(Application *parent) connect(_tray.data(), &Systray::pauseSync, this, &ownCloudGui::slotPauseAllFolders); - connect(_tray.data(), &Systray::pauseSync, + connect(_tray.data(), &Systray::resumeSync, this, &ownCloudGui::slotUnpauseAllFolders); connect(_tray.data(), &Systray::openHelp, diff --git a/src/gui/systray.cpp b/src/gui/systray.cpp index 79105c8ce1..23ffa5429f 100644 --- a/src/gui/systray.cpp +++ b/src/gui/systray.cpp @@ -105,6 +105,14 @@ void Systray::create() } hideWindow(); emit activated(QSystemTrayIcon::ActivationReason::Unknown); + + const auto folderMap = FolderMan::instance()->map(); + for (const auto *folder : folderMap) { + if (!folder->syncPaused()) { + _syncIsPaused = false; + break; + } + } } void Systray::slotNewUserSelected() diff --git a/src/gui/systray.h b/src/gui/systray.h index e4d27c0658..b78aa72ee2 100644 --- a/src/gui/systray.h +++ b/src/gui/systray.h @@ -91,7 +91,7 @@ private: QPoint computeWindowPosition(int width, int height) const; bool _isOpen = false; - bool _syncIsPaused = false; + bool _syncIsPaused = true; QPointer _trayEngine; };