diff --git a/main.js b/main.js index 8a072c92..8f146acf 100644 --- a/main.js +++ b/main.js @@ -62332,7 +62332,7 @@ class BCPlugin extends obsidian.Plugin { this.saveSettings = async () => await this.saveData(this.settings); } registerActiveLeafChangeEvent() { - this.activeLeafChange = this.app.workspace.on("active-leaf-change", async () => { + this.activeLeafChange = this.app.workspace.on("file-open", async () => { if (this.settings.refreshOnNoteChange) { await refreshIndex(this); } diff --git a/src/main.ts b/src/main.ts index df204eca..1726ace0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -67,7 +67,7 @@ export default class BCPlugin extends Plugin { registerActiveLeafChangeEvent() { this.activeLeafChange = this.app.workspace.on( - "active-leaf-change", + "file-open", async () => { if (this.settings.refreshOnNoteChange) { await refreshIndex(this);