diff --git a/src/main.ts b/src/main.ts index 19260a5..c8f7941 100644 --- a/src/main.ts +++ b/src/main.ts @@ -156,6 +156,12 @@ export default class gamification extends Plugin implements GamificationMediator this.app.vault.on('rename', this.onFileRenamed.bind(this)) ); + + this.registerCommands(); + + } + + private registerCommands() { if (this.getSettingBoolean('debug')){ this.addRibbonIcon("accessibility", "Crafting", async () => { @@ -263,13 +269,13 @@ export default class gamification extends Plugin implements GamificationMediator id: 'reset-game', name: 'Reset game', callback: async () => { - await this.resetGame(); - }, + await this.resetGame(); + }, }); } - + // command: rate note maturity this.addCommand({ id: 'rate-note-maturity', @@ -302,10 +308,8 @@ export default class gamification extends Plugin implements GamificationMediator return false; } }); - } - async onEditorChanged() { const activeView = this.app.workspace.getActiveViewOfType(MarkdownView); if (!activeView) return;