Skip to content

Commit

Permalink
Remove dev log and unneeded comments
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Aug 17, 2022
1 parent 46fb513 commit dd4b811
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions ui/app/services/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,6 @@ export default class KeyboardService extends Service {
command.label === 'Hide Keyboard Shortcuts'
) {
command.action();

// TODO: Temporary dev log
if (this.config.isDev) {
this.matchedCommands.forEach((command) =>
console.log('command run', command, command.action.toString())
);
}
}
});
this.clearBuffer();
Expand All @@ -427,9 +420,6 @@ export default class KeyboardService extends Service {
}

get matchedCommands() {
// Ember Compare: returns 0 if there's no diff between arrays.
// TODO: do we think this is faster than a pure JS .join("") comparison?

// Shiftless Buffer: handle the case where use is holding shift (to see shortcut hints) and typing a key command
const shiftlessBuffer = this.buffer.map((key) =>
key.replace('Shift+', '').toLowerCase()
Expand All @@ -441,6 +431,7 @@ export default class KeyboardService extends Service {
`Shift+${this.buffer.map((key) => key.replace('Shift+', '')).join('')}`,
];

// Ember Compare: returns 0 if there's no diff between arrays.
const matches = this.keyCommands.filter((command) => {
return (
command.action &&
Expand Down

0 comments on commit dd4b811

Please sign in to comment.