android: ensure saved posts don't draw under bottom nav

This commit is contained in:
Harsh Shandilya 2022-02-10 13:15:58 +05:30
parent 9db923daf6
commit 6222152f64
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -122,7 +122,7 @@ fun LobstersApp(
isVisible = navItems.any { it.route == currentDestination }, isVisible = navItems.any { it.route == currentDestination },
) )
}, },
) { ) { paddingValues ->
NavHost( NavHost(
navController, navController,
startDestination = Destinations.startDestination.getRoute(), startDestination = Destinations.startDestination.getRoute(),
@ -146,7 +146,9 @@ fun LobstersApp(
listState = savedListState, listState = savedListState,
isSaved = viewModel::isPostSaved, isSaved = viewModel::isPostSaved,
postActions = postActions, postActions = postActions,
modifier = Modifier.nestedScroll(nestedScrollConnection), modifier =
Modifier.nestedScroll(nestedScrollConnection)
.padding(bottom = paddingValues.calculateBottomPadding()),
) )
} }
composable(Destinations.Comments.getRoute("{postId}")) { backStackEntry -> composable(Destinations.Comments.getRoute("{postId}")) { backStackEntry ->