If I navigate from Screen A to Screen B using popU...
# compose
r
If I navigate from Screen A to Screen B using popUpTo(A){ inclusive = true }. Shouldn't my Screen B act like a start destination. I mean I want to exit my app if I press system back button from screen B. But in my case it is not happening if I press the back button from Screen B, it does nothing.
1
w
I’m not sure why you’re seeing that behavior. I have this code, and it works as expected:
Copy code
navController.navigate(Screen.Screen2.name) {
    popUpTo(Screen.Screen1.name) {
        inclusive = true
    }
}
Is there any chance you are overriding the back button somewhere else?