context menu

This commit is contained in:
Jan Prochazka
2021-03-20 08:16:32 +01:00
parent dcb4c5071a
commit efc07280a6
8 changed files with 106 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
import { commands } from '../stores';
import invalidateCommands from './invalidateCommands';
import { invalidateCommandDefinitions } from './invalidateCommands';
export interface SubCommand {
text: string;
@@ -39,16 +39,5 @@ export default function registerCommand(command: GlobalCommand) {
enabled: !testEnabled,
},
}));
invalidateCommands();
// if (enabledStore) {
// enabledStore.subscribe(value => {
// commands.update(x => ({
// ...x,
// [command.id]: {
// ...x[command.id],
// enabled: value,
// },
// }));
// });
// }
invalidateCommandDefinitions();
}