mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 11:02:28 +08:00
feat(in-app-help): support child nesting
This commit is contained in:
parent
f1d641ac32
commit
94d53727d1
@ -26,14 +26,8 @@ function parseNoteMetaFile(noteMetaFile: NoteMetaFile): HiddenSubtreeItem[] {
|
||||
return [];
|
||||
}
|
||||
|
||||
const metaRoot = noteMetaFile.files[0];
|
||||
const items: HiddenSubtreeItem[] = [];
|
||||
|
||||
for (const childMeta of metaRoot.children ?? []) {
|
||||
items.push(parseNoteMeta(childMeta));
|
||||
}
|
||||
|
||||
return items;
|
||||
const metaRoot = parseNoteMeta(noteMetaFile.files[0]);
|
||||
return metaRoot.children ?? [];
|
||||
}
|
||||
|
||||
function parseNoteMeta(noteMeta: NoteMeta): HiddenSubtreeItem {
|
||||
@ -43,5 +37,14 @@ function parseNoteMeta(noteMeta: NoteMeta): HiddenSubtreeItem {
|
||||
type: "doc"
|
||||
};
|
||||
|
||||
if (noteMeta.children) {
|
||||
const children: HiddenSubtreeItem[] = [];
|
||||
for (const childMeta of noteMeta.children) {
|
||||
children.push(parseNoteMeta(childMeta));
|
||||
}
|
||||
|
||||
item.children = children;
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user