appyx icon indicating copy to clipboard operation
appyx copied to clipboard

Wait before restoring nodes

Open ganfra opened this issue 3 years ago • 1 comments

Hello there. We are using some ParentNode as dagger component holder, and so they are responsible for injecting dependencies to the graph. In case of restoring from process death, some of the dependencies are not yet retrieved (because a suspendable method is responsible for creating them) but the ParentNode is rebuilding all the children nodes, which are expecting the dependencies to be available through the graph. Is there any possibility to wait before restoring the children nodes?

ganfra avatar Jan 31 '23 13:01 ganfra

Hi @ganfra ParentNode starts managing children when onBuilt() is called. Can you possibly defer calling it to the point when you have dependencies ready?

KovalevAndrey avatar Feb 09 '23 17:02 KovalevAndrey