Jordi Saumell
02/06/2021, 4:53 PMOnDestinationChangedListener of the Navigation component. I have a bottom nav bar with 3 items, and the third is a subgraph. When I navigate to that one my OnDestinationChangedListener gets called twice, first with the start destination and then with the actual destination.
Is this the intended behaviour?Jordi Saumell
02/06/2021, 4:57 PMOnDestinationChangedListener to detect when the start destination was opened and update the observable with the start destination. As the OnDestinationChangedListener goes through the start destination, it breaks my solution.Ian Lake
02/06/2021, 5:05 PMOnDestinationChangedListener at all within Compose, use the currentBackStackEntryAsState() as the documentation does: https://developer.android.com/jetpack/compose/navigation#bottom-navIan Lake
02/06/2021, 5:06 PMpopUpTo style shown there, you won't get any intermediate state such as the start destination being dispatched like you would if you did it with a separate popBackStack() followed by a navigate()Jordi Saumell
02/06/2021, 5:14 PMIan Lake
02/06/2021, 5:23 PMpopUpTo stuff came in alpha02 back in November, fixes for nested graphs came in alpha03 in December, so not that recent, no