mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Merge pull request #2209 from nextcloud/fix-pause-sync-states
Fix pause sync states
This commit is contained in:
commit
f8fb26424d
@ -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,
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -91,7 +91,7 @@ private:
|
||||
QPoint computeWindowPosition(int width, int height) const;
|
||||
|
||||
bool _isOpen = false;
|
||||
bool _syncIsPaused = false;
|
||||
bool _syncIsPaused = true;
|
||||
QPointer<QQmlApplicationEngine> _trayEngine;
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user