mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 17:25:52 +01:00
got rid of .isDeleted on froca entities (the property is not available there)
This commit is contained in:
@@ -241,9 +241,9 @@ class NoteContext extends Component {
|
||||
|
||||
async entitiesReloadedEvent({loadResults}) {
|
||||
if (loadResults.isNoteReloaded(this.noteId)) {
|
||||
const note = loadResults.getEntityRow('notes', this.noteId);
|
||||
const noteRow = loadResults.getEntityRow('notes', this.noteId);
|
||||
|
||||
if (note.isDeleted) {
|
||||
if (noteRow.isDeleted) {
|
||||
this.noteId = null;
|
||||
this.notePath = null;
|
||||
|
||||
|
||||
@@ -15,14 +15,14 @@ export default class ShortcutComponent extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
bindNoteShortcutHandler(label) {
|
||||
const handler = () => appContext.tabManager.getActiveContext().setNote(label.noteId);
|
||||
const namespace = label.attributeId;
|
||||
bindNoteShortcutHandler(labelOrRow) {
|
||||
const handler = () => appContext.tabManager.getActiveContext().setNote(labelOrRow.noteId);
|
||||
const namespace = labelOrRow.attributeId;
|
||||
|
||||
if (label.isDeleted) {
|
||||
if (labelOrRow.isDeleted) { // only applicable if row
|
||||
shortcutService.removeGlobalShortcut(namespace);
|
||||
} else {
|
||||
shortcutService.bindGlobalShortcut(label.value, handler, namespace);
|
||||
shortcutService.bindGlobalShortcut(labelOrRow.value, handler, namespace);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user