diff --git a/src/lib b/src/lib index f5ca1c0..8985fa7 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit f5ca1c09d9000dc1edff98a7e3c79bfdfe69d2fe +Subproject commit 8985fa74e99505c2424cb2aecfb8eb4a167db84d diff --git a/src/main.ts b/src/main.ts index a3f8ca4..a560e40 100644 --- a/src/main.ts +++ b/src/main.ts @@ -216,12 +216,14 @@ export default class ObsidianLiveSyncPlugin extends Plugin { const notesList = notes.map(e => e.path); if (notesList.length == 0) { Logger("There are no conflicted documents", LOG_LEVEL.NOTICE); - return; + return false; } const target = await askSelectString(this.app, "File to view History", notesList); if (target) { await this.resolveConflicted(target); + return true; } + return false; } async resolveConflicted(target: string) { if (isInternalMetadata(target)) { @@ -714,6 +716,13 @@ export default class ObsidianLiveSyncPlugin extends Plugin { this.pickFileForResolve(); }, }) + this.addCommand({ + id: "livesync-all-conflictcheck", + name: "Resolve all conflicted files", + callback: async () => { + while (await this.pickFileForResolve()); + }, + }) this.addCommand({ id: "livesync-runbatch", name: "Run pended batch processes", @@ -1302,7 +1311,7 @@ export default class ObsidianLiveSyncPlugin extends Plugin { } this.app.vault.adapter.append(normalizePath(logDate), vaultName + ":" + newMessage + "\n"); } - logMessageStore.apply(e => [...e, newMessage].slice(this.settings.showVerboseLog ? -1000 : -100)); + logMessageStore.apply(e => [...e, newMessage].slice(-100)); this.setStatusBarText(null, messageContent); if (level >= LOG_LEVEL.NOTICE) {