Skip to content

Commit

Permalink
forgot to register the event with the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed May 20, 2024
1 parent a41f6d6 commit 69a9b10
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/mechanics/mechanics-blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@ export class MechanicsRenderer {
this.source = source;
this.plugin = plugin;
this.sourcePath = sourcePath;
plugin.settings.on("change", ({ key, oldValue, newValue }) => {
if (
oldValue !== newValue &&
(key === "showMechanicsToggle" || key === "collapseMoves")
) {
this.render();
}
});
plugin.register(
plugin.settings.on("change", ({ key, oldValue, newValue }) => {
if (
oldValue !== newValue &&
(key === "showMechanicsToggle" || key === "collapseMoves")
) {
this.render();
}
}),
);
}

async render(): Promise<void> {
Expand Down

0 comments on commit 69a9b10

Please sign in to comment.