```val navController = rememberNavController() val...
# compose
s
Copy code
val navController = rememberNavController()
val visible by remember { mutableStateOf(false) }
Scaffold(
    ...
) {
    NavHost(navController, "screen1") {
        composable("screen1") { ... }
        composable("screen2") { ... }
    }
}

AnimatedVisibility(visible) {
    Box(modifier = Modifier.fillMaxSize()) { ... }
}
When I'm on screen2 and the
AnimatedVisiblity
becomes visible, it automatically navigates to screen1. This feels like a bug 🤔
The same thing happens if I have
if(visible.value)
instead of
AnimatedVisibility
@Ian Lake sorry for the tag but I don't know what else to do
i
File an issue of course 😃 If you ever find something not working as you'd expect and it doesn't seem like it could be something caused by your code, then a sample project that reproduces it attached to an issue will be the best way to actually get it fixed: https://issuetracker.google.com/issues/new?component=409828&template=1093757
s