Implemented a notification system for fetched children

This commit is contained in:
Magnus Åhall 2025-02-09 13:49:37 +01:00
parent bb6279c55a
commit 26fe670965
2 changed files with 62 additions and 14 deletions

View file

@ -385,9 +385,7 @@ export class Node {
if (this._children_fetched)
return this.Children
this.Children = await nodeStore.getTreeNodes(this.UUID, this.Level + 1)
this._children_fetched = true
// Children are sorted to allow for storing siblings befare and after.
@ -403,6 +401,9 @@ export class Node {
this.Children[i]._parent = this
}
// Notify the tree that all children are fetched and ready to process.
_notes2.current.tree.fetchChildrenOn(this.UUID)
return this.Children
}//}}}
hasChildren() {//{{{