Hello, I'm using navigation 2.9.0 in compose and I...
# navigation-architecture-component
s
Hello, I'm using navigation 2.9.0 in compose and I have an issue with _"intermediate conditional navigation and transitions"_; I'm navigating to an intermediate destination that contains a LaunchedEffect that chooses how to forward to the final destination.
Home -> Intemediate -> Detail 1 or Detail2.
After navigating we then pop this intermediate destination from the backstack. The problem is that using this technique the exitTransition no longer works when hitting the back button; the screen completes immediately with no transition. I noticed that the exitTransition works in versions 2.7.* however this version has it's own bugs (specifically on the entry transition) so I cannot revert to this version. Has anyone come across this? The only work around I can see right now is to declare a backHandler on
Detail1 / Detail 2
and navigating to Home with a popupTo Home argument. However its not desirable because it re-loads the screen and using launchSingleTop also removes the transition.
a
Will this work for you?
Copy code
navController.navigate(Detail1) {
    popUpTo<Intermediate>(inclusive = true)
  }
s
No unfortunately this is exactly what I had 😞
a
What is the navigation structure? Are the destinations nested? If they are nested, can you try applying the transitions to
navigation<T>
?