small fixes for collapse/expand

This commit is contained in:
zadam
2020-05-03 13:52:12 +02:00
parent 2a3091f788
commit 43e12fbea2
4 changed files with 13 additions and 6 deletions

View File

@@ -40,9 +40,9 @@ class TreeContextMenu {
async getMenuItems() {
const note = await treeCache.getNote(this.node.data.noteId);
const branch = treeCache.getBranch(this.node.data.branchId);
const parentNote = await treeCache.getNote(branch.parentNoteId);
const isNotRoot = note.noteId !== 'root';
const isHoisted = note.noteId === hoistedNoteService.getHoistedNoteId();
const parentNote = isNotRoot ? await treeCache.getNote(branch.parentNoteId) : null;
// some actions don't support multi-note so they are disabled when notes are selected
// the only exception is when the only selected note is the one that was right-clicked, then