Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
fix: 🔥 Remove event register
Browse files Browse the repository at this point in the history
Otherwise it loops on itself
  • Loading branch information
selfire1 committed Feb 9, 2022
1 parent cb12d7e commit 0280510
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ export default class SetMobileThemePlugin extends Plugin {
this.setThemeByDevice();

// Listen for CSS changes (installing a new plugin)
this.registerEvent(
this.app.workspace.on("css-change", () => {
console.log("Set Mobile Theme: Noticed CSS change");
this.setThemeByDevice();
})
);
// this.registerEvent(
// this.app.workspace.on("css-change", () => {
// console.log("Set Mobile Theme: Noticed CSS change");
// this.setThemeByDevice();
// })
// );

}

Expand Down

0 comments on commit 0280510

Please # to comment.