launcher improvements

This commit is contained in:
zadam
2022-12-01 16:22:04 +01:00
parent 7aa801fc1f
commit 0e68e8069b
10 changed files with 177 additions and 112 deletions

View File

@@ -15,14 +15,14 @@ export default class ShortcutComponent extends Component {
});
}
bindNoteShortcutHandler(attr) {
const handler = () => appContext.tabManager.getActiveContext().setNote(attr.noteId);
const namespace = attr.attributeId;
bindNoteShortcutHandler(label) {
const handler = () => appContext.tabManager.getActiveContext().setNote(label.noteId);
const namespace = label.attributeId;
if (attr.isDeleted) {
if (label.isDeleted) {
shortcutService.removeGlobalShortcut(namespace);
} else {
shortcutService.bindGlobalShortcut(attr.value, handler, namespace);
shortcutService.bindGlobalShortcut(label.value, handler, namespace);
}
}