fix hidden notes appearing after creation in a new document

This commit is contained in:
zadam 2021-09-23 23:30:30 +02:00
parent a2baa9bdb3
commit 8769fd71cb
2 changed files with 4 additions and 2 deletions

View File

@ -1027,7 +1027,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
} }
} }
if (!ecBranch.isDeleted) { if (!ecBranch.isDeleted && ecBranch.noteId !== 'hidden') {
for (const parentNode of this.getNodesByNoteId(ecBranch.parentNoteId)) { for (const parentNode of this.getNodesByNoteId(ecBranch.parentNoteId)) {
if (parentNode.isFolder() && !parentNode.isLoaded()) { if (parentNode.isFolder() && !parentNode.isLoaded()) {
continue; continue;
@ -1040,7 +1040,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
await froca.getNote(ecBranch.noteId); await froca.getNote(ecBranch.noteId);
const frocaBranch = froca.getBranch(ecBranch.branchId); const frocaBranch = froca.getBranch(ecBranch.branchId);
// we're forcing lazy since it's not clear if the whole required subtree is in froca // we're forcing lazy since it's not clear if the whole required subtree is in froca
parentNode.addChildren([this.prepareNode(frocaBranch, true)]); parentNode.addChildren([this.prepareNode(frocaBranch, true)]);
this.sortChildren(parentNode); this.sortChildren(parentNode);

View File

@ -13,6 +13,8 @@ span.fancytree-node.fancytree-hide {
.fancytree-title { .fancytree-title {
margin-left: 7px; margin-left: 7px;
outline: none; outline: none;
position: relative;
top: 2px;
} }
.fancytree-expander { .fancytree-expander {