I have an app that has a Home screen, but kicks yo...
# compose
c
I have an app that has a Home screen, but kicks you to the SignIn screen if userManager.isLoggedIn == false. This works fine, but my bottom nav also works based off of whether or not I'm on the Home screen. Problem: The bottomNav flashes on the screen on a cold start In my test, I made my Home screen a Box(filledMaxSize with background Red), and it does NOT show/flicker when I launch the app. The only thing that flickers onto the screen is the bottomNav. It is very minor but I was wondering if there's something I can do to improve this?
Copy code
@Composable
fun MyBottomNav(navController: NavController, items: List<Screen>, userManager: UserManager
) {
    val navBackStackEntry by navController.currentBackStackEntryAsState()
    val currentDestination = navBackStackEntry?.destination

    if(currentDestination?.hierarchy?.any { it.route == Screen.Home.route } == true) {
        BottomNavigation(...
n
I remember you posting about something like this before and a google folk commented saying that there’s a bug that’s causing the flicker. Is this the same thing?
🤔 1
c
I don't think I asked that? (unless im going crazy)
maybe it’s not related?
c
I think it is. Hahaha. Thanks Nick. I think I've been on #compose for too long and have to sign off for a bit.
I remember that interaction now that you bring it up. Ian, that update for initial state was never released yet right? I guess my designer brought up the issue again today and I started going down the rabbit hole and I was surprised that my Home screen (red screen) doesn't actually flicker, it's only the bottom Nav.
n
hahaha 😉