Hi @Ian Lake,I have this code where I don't want to show the
in the bottomBar of the
when I am in a certain screen (which for this sample code is ScreenC). But everytime I get to ScreenC, it goes ScreenC and immediately jumps back to startDestination, ScreenA. Am I doing something wrong here?
@Ian Lake I'm having a similar issue where changing the
from a preference (light/dark mode) restarts the backstack to the startDestination. I believe this happens because on recomposition, the
function is remembered (NavHost.kt #61) and this function won't give the same reference when it recomposes, so the block inside the remember will run and create a new graph.I've workarounded this issue by adding
var navhost: (@Composable () -> Unit)? = null
And initializing my navhost in my Scaffold's body content with