Merge pull request #15 from al0cam/timerFix

fix: timer killed by restart
This commit is contained in:
Ben 2026-05-15 10:58:32 +02:00 committed by GitHub
commit 450605fd66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,6 +21,8 @@ export default class AutoMoverPlugin extends obsidian.Plugin {
this.settings = Object.assign({}, Settings.DEFAULT_SETTINGS, await this.loadData());
this.addSettingTab(new SettingsTab(this.app, this));
this.automaticMoving();
// negative ifs for easier reading and debugging
if (!this.areMovingTriggersEnabled()) return;
if (!this.areThereRulesToApply()) return;
@ -37,7 +39,7 @@ export default class AutoMoverPlugin extends obsidian.Plugin {
this.registerEvent(
// since i am defining my own event, ts-lint is crying about it but it works in the end
this.app.workspace.on("AutoMover:automatic-moving-update", () => {
// console.log("Automatic moving update");
console.log("Automatic moving update");
this.automaticMoving();
}),
);