mirror of
https://github.com/al0cam/AutoMover.git
synced 2026-07-22 05:41:25 +00:00
Merge pull request #15 from al0cam/timerFix
fix: timer killed by restart
This commit is contained in:
commit
450605fd66
1 changed files with 3 additions and 1 deletions
4
main.ts
4
main.ts
|
|
@ -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();
|
||||
}),
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue