Implemented a notification system for fetched children
This commit is contained in:
parent
bb6279c55a
commit
26fe670965
2 changed files with 62 additions and 14 deletions
|
|
@ -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() {//{{{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue