Skip to content

Commit

Permalink
trigger settings events when data.json is externally modified, too
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed May 20, 2024
1 parent 69a9b10 commit 958adcb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ export default class ForgedPlugin extends Plugin {
this.settings = settings;
}

async onExternalSettingsChange() {
Object.assign(this.settings, await this.loadData());
}

async saveSettings(): Promise<void> {
await this.saveData(this.settings);
}
Expand Down

0 comments on commit 958adcb

Please sign in to comment.