From 6dd82897de96c45ea941424782c28f4065a2cefe Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Sat, 25 Jun 2022 09:40:43 +0200 Subject: [PATCH] fix: file-open instead of active-leaf-change --- main.js | 2 +- src/main.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);