fix issues with note tree

This commit is contained in:
zadam
2020-08-25 23:25:15 +02:00
parent 6a3e27eb62
commit 87161cfe0d
6 changed files with 204 additions and 186 deletions

View File

@@ -248,7 +248,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
this.reloadTreeFromCache();
});
this.initialized = this.initFancyTree();
this.initFancyTree();
this.setupNoteTitleTooltip();
}
@@ -302,7 +302,6 @@ export default class NoteTreeWidget extends TabAwareWidget {
this.$tree.fancytree({
titlesTabbable: true,
autoScroll: true,
keyboard: true,
extensions: utils.isMobile() ? ["dnd5", "clones"] : ["hotkeys", "dnd5", "clones"],
source: treeData,
@@ -1348,12 +1347,6 @@ export default class NoteTreeWidget extends TabAwareWidget {
appContext.triggerCommand('focusOnTitle');
}
activateParentNoteCommand({node}) {
if (!hoistedNoteService.isRootNode(node)) {
node.getParent().setActive().then(this.clearSelectedNodes);
}
}
protectSubtreeCommand({node}) {
protectedSessionService.protectNote(node.data.noteId, true, true);
}