I was using compose-navigation with bottom nav, I got a doubt
(As docs stated one is
Profile Composable
and other is
FriendList Composable
, using as eg.
and below as onClick code
onClick = {
// This is the equivalent to popUpTo the start destination
navController.popBackStack(navController.graph.startDestination, false)
if (currentRoute != screen.route) {
navController.navigate(screen.route)
}
}
)
Lets say
So startDestination is
Profile
, then we clicked on
FriendList
bottom nav item, and then we clicked Profile, then FriendList
When I press back, I never go back to FriendList, though I have visited it twice
How does popBackStack works here, popping till Profile and not including Profile