- The boot sequence has been corrected and now boots smoothly.
- Auto applying of batch save will be processed earlier than before.
This commit is contained in:
vorotamoroz
2022-10-03 10:52:31 +09:00
parent ee37764040
commit 3292a48054

View File

@@ -310,8 +310,8 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
// this.registerWatchEvents(); // this.registerWatchEvents();
this.addSettingTab(new ObsidianLiveSyncSettingTab(this.app, this)); this.addSettingTab(new ObsidianLiveSyncSettingTab(this.app, this));
this.registerFileWatchEvents();
this.app.workspace.onLayoutReady(async () => { this.app.workspace.onLayoutReady(async () => {
this.registerFileWatchEvents();
if (this.localDatabase.isReady) if (this.localDatabase.isReady)
try { try {
if (this.isRedFlagRaised()) { if (this.isRedFlagRaised()) {
@@ -830,7 +830,7 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
if (!applyBatch && this.watchedFileEventQueue.length < FileWatchEventQueueMax) { if (!applyBatch && this.watchedFileEventQueue.length < FileWatchEventQueueMax) {
// Defer till applying batch save or queue has been grown enough. // Defer till applying batch save or queue has been grown enough.
// or 120 seconds after. // or 120 seconds after.
setTrigger("applyBatchAuto", 120000, () => { setTrigger("applyBatchAuto", 30000, () => {
this.procFileEvent(true); this.procFileEvent(true);
}) })
return; return;