Skip to content

Commit

Permalink
fix: Defer watcher until layout ready to help improve launch times
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Apr 26, 2024
1 parent 23b9f42 commit 1fe974b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/watcher/watcher.ts
Expand Up @@ -291,7 +291,9 @@ export class Watcher extends Component {
}
);

this.start();
this.plugin.app.workspace.onLayoutReady(() => {
this.start();
});
}
start(calendar?: Calendar) {
const calendars = calendar ? [calendar] : this.calendars;
Expand Down

0 comments on commit 1fe974b

Please sign in to comment.