Is it on purpose that `navHostController.graph` re...
# compose
m
Is it on purpose that
navHostController.graph
returns a different graph than
navHostController.currentDestination.parent
?
i
That depends entirely on whether you are using nested graphs - the
navController.graph
could also be the parent's parent or multiple additional layers up your
hierarchy
m
Alright, thanks for the explanation. This is the scenario of nested graphs, so what you are explaining is definitely what happened. Very confusing, as the docs didn’t indicate this (or at least didn’t caught my attention)
i
Did you think every destination in your whole navigation graph had the same
parent
? And that
parent
was the root graph?