mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
Do not always re-notify user on existing folder now big if this folder already black or white listed
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
2324a60c76
commit
449bac837b
1 changed files with 15 additions and 6 deletions
|
@ -1264,15 +1264,24 @@ void Folder::slotExistingFolderNowBig(const QString &folderPath)
|
|||
bool ok2 = false;
|
||||
auto blacklist = journal->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok1);
|
||||
auto whitelist = journal->getSelectiveSyncList(SyncJournalDb::SelectiveSyncWhiteList, &ok2);
|
||||
if (ok1 && ok2 && !blacklist.contains(trailSlashFolderPath) && !whitelist.contains(trailSlashFolderPath)) {
|
||||
|
||||
|
||||
const auto inDecidedLists = blacklist.contains(trailSlashFolderPath) || whitelist.contains(trailSlashFolderPath);
|
||||
if (inDecidedLists) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto relevantList = stopSyncing ? blacklist : whitelist;
|
||||
const auto relevantListType = stopSyncing ? SyncJournalDb::SelectiveSyncBlackList : SyncJournalDb::SelectiveSyncWhiteList;
|
||||
|
||||
if (ok1 && ok2 && !inDecidedLists) {
|
||||
relevantList.append(trailSlashFolderPath);
|
||||
journal->setSelectiveSyncList(relevantListType, relevantList);
|
||||
|
||||
if (stopSyncing) {
|
||||
blacklist.append(trailSlashFolderPath);
|
||||
journal->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, blacklist);
|
||||
// Abort current down sync and start again
|
||||
slotTerminateSync();
|
||||
scheduleThisFolderSoon();
|
||||
} else {
|
||||
whitelist.append(trailSlashFolderPath);
|
||||
journal->setSelectiveSyncList(SyncJournalDb::SelectiveSyncWhiteList, whitelist);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue