Closed s0nance closed 4 months ago
What Compose Destinations version are you using?
Compose Destinations v2.0.0-beta01 Jetpack Compose version 1.6.5
Yes, you are right. Will be fixed on next versions. Thanks for reporting!
Included on beta07 building now. Thank you once again! π
No problem, it's been a pleasure!
Thanks for your work.
Hello!
I encountered an issue where calling my current NavGraph .allDestinations extension is not returning the nested nav graphs destinations.
Here is my generated tree:
I expect the extension to return, for FromSettingsLoginGraph, the given destinations:
[FromSettingsLoginLoginScreenDestination, FromSettingsRegisterRegisterScreenDestination]
, but it seems to only returnFromSettingsLoginLoginScreenDestination
.Is this an expected behavior ?
I used a small function to check if my current destination is well a part of the nested navigation:
and it returns true when I navigate to (so when appCurrentDestinationState route equals:)
FromSettingsRegisterRegisterScreenDestination
. So it seems it is indeed a part of the nested graphs!By looking at your code, inside the
SpecExtension.kt
file, it seems you are recursively returning all destinations, even those from nestedNavGraphs, so I guess it is a bug?I'm looking forward to hear your advice on this! Thank you