mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Extract syncIsPaused initialisation into new updater slot
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
92f6de9ca9
commit
d497e265df
@ -127,14 +127,7 @@ 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;
|
||||
}
|
||||
}
|
||||
slotUpdateSyncPausedState();
|
||||
}
|
||||
|
||||
void Systray::showWindow(WindowPosition position)
|
||||
@ -440,6 +433,17 @@ void Systray::slotCurrentUserChanged()
|
||||
UserAppsModel::instance()->buildAppList();
|
||||
}
|
||||
|
||||
void Systray::slotUpdateSyncPausedState()
|
||||
{
|
||||
const auto folderMap = FolderMan::instance()->map();
|
||||
for (const auto *folder : folderMap) {
|
||||
if (!folder->syncPaused()) {
|
||||
_syncIsPaused = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Systray::slotUnpauseAllFolders()
|
||||
{
|
||||
setPauseOnAllFoldersHelper(false);
|
||||
|
||||
@ -152,6 +152,7 @@ public slots:
|
||||
void presentShareViewInTray(const QString &localPath);
|
||||
|
||||
private slots:
|
||||
void slotUpdateSyncPausedState();
|
||||
void slotUnpauseAllFolders();
|
||||
void slotPauseAllFolders();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user