fixes for some note moving edge cases, closes #454

This commit is contained in:
zadam
2019-03-18 21:59:53 +01:00
parent 33f2aaa650
commit 1faf2c6ecd
5 changed files with 92 additions and 35 deletions

View File

@@ -86,18 +86,12 @@ async function prepareNode(branch) {
extraClasses: await getExtraClasses(note),
icon: await getIcon(note),
refKey: note.noteId,
expanded: branch.isExpanded || hoistedNoteId === note.noteId
expanded: branch.isExpanded || hoistedNoteId === note.noteId,
lazy: true
};
if (note.hasChildren() || note.type === 'search') {
node.folder = true;
if (node.expanded && note.type !== 'search') {
node.children = await prepareRealBranch(note);
}
else {
node.lazy = true;
}
}
return node;