Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
saertna committed Feb 15, 2024
1 parent fe0a6ed commit eb475b3
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {

Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit eb475b3

Please sign in to comment.