mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-25 13:55:47 +03:00
Folder: Remove slotTerminateAndPauseSync
This make no sens to just set the pause config flag here. It make selective sync to mark the folder as posed on restart
This commit is contained in:
parent
fe1653ede6
commit
10989d13e4
4 changed files with 3 additions and 10 deletions
|
@ -383,7 +383,7 @@ void AccountSettings::slotResetCurrentFolder()
|
||||||
if( ret == QMessageBox::Yes ) {
|
if( ret == QMessageBox::Yes ) {
|
||||||
FolderMan *folderMan = FolderMan::instance();
|
FolderMan *folderMan = FolderMan::instance();
|
||||||
Folder *f = folderMan->folder(alias);
|
Folder *f = folderMan->folder(alias);
|
||||||
f->slotTerminateAndPauseSync();
|
f->slotTerminateSync();
|
||||||
f->wipe();
|
f->wipe();
|
||||||
folderMan->slotScheduleAllFolders();
|
folderMan->slotScheduleAllFolders();
|
||||||
}
|
}
|
||||||
|
@ -499,7 +499,7 @@ void AccountSettings::slotEnableCurrentFolder()
|
||||||
// message box can return at any time while the thread keeps running,
|
// message box can return at any time while the thread keeps running,
|
||||||
// so better check again after the user has responded.
|
// so better check again after the user has responded.
|
||||||
if ( f->isBusy() && terminate ) {
|
if ( f->isBusy() && terminate ) {
|
||||||
f->slotTerminateAndPauseSync();
|
f->slotTerminateSync();
|
||||||
}
|
}
|
||||||
f->setSyncPaused(!currentlyPaused); // toggle the pause setting
|
f->setSyncPaused(!currentlyPaused); // toggle the pause setting
|
||||||
folderMan->slotSetFolderPaused( alias, !currentlyPaused );
|
folderMan->slotSetFolderPaused( alias, !currentlyPaused );
|
||||||
|
|
|
@ -515,12 +515,6 @@ void Folder::slotTerminateSync()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Folder::slotTerminateAndPauseSync()
|
|
||||||
{
|
|
||||||
slotTerminateSync();
|
|
||||||
FolderMan::instance()->slotSetFolderPaused(alias(), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// This removes the csync File database
|
// This removes the csync File database
|
||||||
// This is needed to provide a clean startup again in case another
|
// This is needed to provide a clean startup again in case another
|
||||||
// local folder is synced to the same ownCloud.
|
// local folder is synced to the same ownCloud.
|
||||||
|
|
|
@ -138,7 +138,6 @@ public slots:
|
||||||
* terminate the current sync run
|
* terminate the current sync run
|
||||||
*/
|
*/
|
||||||
void slotTerminateSync();
|
void slotTerminateSync();
|
||||||
void slotTerminateAndPauseSync();
|
|
||||||
|
|
||||||
void slotAboutToRemoveAllFiles(SyncFileItem::Direction, bool*);
|
void slotAboutToRemoveAllFiles(SyncFileItem::Direction, bool*);
|
||||||
|
|
||||||
|
|
|
@ -284,7 +284,7 @@ void SelectiveSyncDialog::accept()
|
||||||
|
|
||||||
FolderMan *folderMan = FolderMan::instance();
|
FolderMan *folderMan = FolderMan::instance();
|
||||||
if (_folder->isBusy()) {
|
if (_folder->isBusy()) {
|
||||||
_folder->slotTerminateAndPauseSync();
|
_folder->slotTerminateSync();
|
||||||
}
|
}
|
||||||
folderMan->slotScheduleSync(_folder->alias());
|
folderMan->slotScheduleSync(_folder->alias());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue