mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-10-27 11:33:21 +00:00
Fixed:
- Fixed the Infinity loop
This commit is contained in:
1 parent
c18b5c24b4
commit
d9b69d9a1b
1 file changed
+6
-1
+6
-1
@@ -841,7 +841,8 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
clearTrigger("applyBatchAuto");
|
clearTrigger("applyBatchAuto");
|
||||||
const ret = await runWithLock("procFiles", false, async () => {
|
const ret = await runWithLock("procFiles", true, async () => {
|
||||||
|
do {
|
||||||
const procs = [...this.watchedFileEventQueue];
|
const procs = [...this.watchedFileEventQueue];
|
||||||
this.watchedFileEventQueue = [];
|
this.watchedFileEventQueue = [];
|
||||||
for (const queue of procs) {
|
for (const queue of procs) {
|
||||||
@@ -877,6 +878,8 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.refreshStatusText();
|
this.refreshStatusText();
|
||||||
|
} while (this.watchedFileEventQueue.length != 0);
|
||||||
|
return true;
|
||||||
})
|
})
|
||||||
this.refreshStatusText();
|
this.refreshStatusText();
|
||||||
return ret;
|
return ret;
|
||||||
@@ -917,8 +920,10 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async applyBatchChange() {
|
async applyBatchChange() {
|
||||||
|
if (this.settings.batchSave) {
|
||||||
return await this.procFileEvent(true);
|
return await this.procFileEvent(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Watch raw events (Internal API)
|
// Watch raw events (Internal API)
|
||||||
watchVaultRawEvents(path: string) {
|
watchVaultRawEvents(path: string) {
|
||||||
|
|||||||
Reference in new issue
Block a user