feat(tree): hide items dragged into a subtreeHidden

This commit is contained in:
Elian Doran 2026-01-10 09:40:19 +02:00
parent 968a17fbfb
commit 0f77caad69
No known key found for this signature in database

View File

@ -758,6 +758,16 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
return;
}
const parentNote = froca.getNoteFromCache(branch.parentNoteId);
if (parentNote?.hasLabel("subtreeHidden")) {
const parentNode = node.getParent();
if (parentNode) {
parentNode.setActive(true);
}
node.remove();
return;
}
const title = `${branch.prefix ? `${branch.prefix} - ` : ""}${note.title}`;
node.data.isProtected = note.isProtected;