mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 03:49:20 +03:00
Uses configuraion to determine if it should show empty folder popup.
Configuration default value is set to false because users are getting the popup message too often. Signed-off-by: Camila San <hello@camila.codes>
This commit is contained in:
parent
936bdd04a8
commit
7f3c3f6eb6
2 changed files with 5 additions and 2 deletions
|
@ -750,7 +750,7 @@ void ConfigFile::setMoveToTrash(bool isChecked)
|
|||
bool ConfigFile::promptDeleteFiles() const
|
||||
{
|
||||
QSettings settings(configFile(), QSettings::IniFormat);
|
||||
return settings.value(QLatin1String(promptDeleteC), true).toBool();
|
||||
return settings.value(QLatin1String(promptDeleteC), false).toBool();
|
||||
}
|
||||
|
||||
void ConfigFile::setPromptDeleteFiles(bool promptDeleteFiles)
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include "propagateremotedelete.h"
|
||||
#include "propagatedownload.h"
|
||||
#include "common/asserts.h"
|
||||
#include "configfile.h"
|
||||
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <windows.h>
|
||||
|
@ -1035,7 +1037,8 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
|
|||
}
|
||||
}
|
||||
|
||||
if (!_hasNoneFiles && _hasRemoveFile) {
|
||||
ConfigFile cfgFile;
|
||||
if (!_hasNoneFiles && _hasRemoveFile && cfgFile.promptDeleteFiles()) {
|
||||
qCInfo(lcEngine) << "All the files are going to be changed, asking the user";
|
||||
bool cancel = false;
|
||||
emit aboutToRemoveAllFiles(syncItems.first()->_direction, &cancel);
|
||||
|
|
Loading…
Reference in a new issue