mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2025-05-29 19:34:08 +02: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
src/libsync
@ -750,7 +750,7 @@ void ConfigFile::setMoveToTrash(bool isChecked)
|
|||||||
bool ConfigFile::promptDeleteFiles() const
|
bool ConfigFile::promptDeleteFiles() const
|
||||||
{
|
{
|
||||||
QSettings settings(configFile(), QSettings::IniFormat);
|
QSettings settings(configFile(), QSettings::IniFormat);
|
||||||
return settings.value(QLatin1String(promptDeleteC), true).toBool();
|
return settings.value(QLatin1String(promptDeleteC), false).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigFile::setPromptDeleteFiles(bool promptDeleteFiles)
|
void ConfigFile::setPromptDeleteFiles(bool promptDeleteFiles)
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
#include "propagateremotedelete.h"
|
#include "propagateremotedelete.h"
|
||||||
#include "propagatedownload.h"
|
#include "propagatedownload.h"
|
||||||
#include "common/asserts.h"
|
#include "common/asserts.h"
|
||||||
|
#include "configfile.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include <windows.h>
|
#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";
|
qCInfo(lcEngine) << "All the files are going to be changed, asking the user";
|
||||||
bool cancel = false;
|
bool cancel = false;
|
||||||
emit aboutToRemoveAllFiles(syncItems.first()->_direction, &cancel);
|
emit aboutToRemoveAllFiles(syncItems.first()->_direction, &cancel);
|
||||||
|
Loading…
Reference in New Issue
Block a user