From 3292a480543e82f992f610f567b69d995446053c Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Mon, 3 Oct 2022 10:52:31 +0900 Subject: [PATCH] Fixed - The boot sequence has been corrected and now boots smoothly. - Auto applying of batch save will be processed earlier than before. --- src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 33f0505..6f682b7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -310,8 +310,8 @@ export default class ObsidianLiveSyncPlugin extends Plugin { // this.registerWatchEvents(); this.addSettingTab(new ObsidianLiveSyncSettingTab(this.app, this)); - this.registerFileWatchEvents(); this.app.workspace.onLayoutReady(async () => { + this.registerFileWatchEvents(); if (this.localDatabase.isReady) try { if (this.isRedFlagRaised()) { @@ -830,7 +830,7 @@ export default class ObsidianLiveSyncPlugin extends Plugin { if (!applyBatch && this.watchedFileEventQueue.length < FileWatchEventQueueMax) { // Defer till applying batch save or queue has been grown enough. // or 120 seconds after. - setTrigger("applyBatchAuto", 120000, () => { + setTrigger("applyBatchAuto", 30000, () => { this.procFileEvent(true); }) return;