mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-07-17 10:06:00 +00:00
fix: suppress bulk conflict resolution notice spam
Bulk newest-revision conflict resolution created one notice per resolved file and updated progress for nine out of every ten files. Keep per-file bulk resolution success messages in the log without displaying notices, update notice-level progress once every ten files, and cover both behaviours with unit tests.
This commit is contained in:
committed by
vorotamoroz
parent
943b2a3bd4
commit
3103dc4f52
@@ -58,7 +58,7 @@ export class ModuleConflictResolver extends AbstractModule {
|
||||
this._log(`Could not write the resolved content to the storage: ${path}`, LOG_LEVEL_NOTICE);
|
||||
return MISSING_OR_ERROR;
|
||||
}
|
||||
const level = subTitle.indexOf("same") !== -1 ? LOG_LEVEL_INFO : LOG_LEVEL_NOTICE;
|
||||
const level = subTitle.indexOf("same") !== -1 || subTitle === "NEWEST" ? LOG_LEVEL_INFO : LOG_LEVEL_NOTICE;
|
||||
this._log(`${path} has been merged automatically`, level);
|
||||
return AUTO_MERGED;
|
||||
}
|
||||
@@ -214,7 +214,8 @@ export class ModuleConflictResolver extends AbstractModule {
|
||||
|
||||
let i = 0;
|
||||
for (const file of files) {
|
||||
if (i++ % 10)
|
||||
i++;
|
||||
if (i % 10 === 0)
|
||||
this._log(
|
||||
`Check and Processing ${i} / ${files.length}`,
|
||||
LOG_LEVEL_NOTICE,
|
||||
|
||||
Reference in New Issue
Block a user