refactor(views): prepare for supporting subtrees

This commit is contained in:
Elian Doran
2025-07-14 12:53:11 +03:00
parent ec7dacfc9b
commit b29c3eff6e
2 changed files with 9 additions and 1 deletions

View File

@@ -256,6 +256,14 @@ class FNote {
return this.children;
}
async getSubtreeNoteIds() {
let noteIds: (string | string[])[] = [];
for (const child of await this.getChildNotes()) {
noteIds.push(await child.getSubtreeNoteIds());
}
return noteIds.flat();
}
async getChildNotes() {
return await this.froca.getNotes(this.children);
}