Skip to content

Commit

Permalink
fix: file-open instead of active-leaf-change
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Jun 25, 2022
1 parent 402da9e commit 6dd8289
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6dd8289

Please sign in to comment.