android: apply padding correctly

This commit is contained in:
Harsh Shandilya 2022-08-03 00:12:18 +05:30
parent ff19b36a9d
commit 73580be6e9
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -155,8 +155,9 @@ fun LobstersApp(
},
) { paddingValues ->
MaterialMotionNavHost(
navController,
navController = navController,
startDestination = Destinations.startDestination.getRoute(),
modifier = Modifier.padding(paddingValues),
) {
val uri = LobstersApi.BASE_URL
composable(
@ -171,7 +172,6 @@ fun LobstersApp(
isPostSaved = viewModel::isPostSaved,
reloadPosts = viewModel::refreshHottestPosts,
postActions = postActions,
modifier = Modifier.padding(bottom = paddingValues.calculateBottomPadding()),
)
}
composable(
@ -184,7 +184,6 @@ fun LobstersApp(
isPostSaved = viewModel::isPostSaved,
reloadPosts = viewModel::refreshNewestPosts,
postActions = postActions,
modifier = Modifier.padding(bottom = paddingValues.calculateBottomPadding()),
)
}
composable(Destinations.Saved.getRoute()) {
@ -193,7 +192,6 @@ fun LobstersApp(
items = savedPosts,
listState = savedListState,
postActions = postActions,
modifier = Modifier.padding(bottom = paddingValues.calculateBottomPadding()),
)
}
composable(
@ -210,7 +208,6 @@ fun LobstersApp(
CommentsPage(
postId = postId,
getDetails = viewModel::getPostComments,
modifier = Modifier.padding(bottom = paddingValues.calculateBottomPadding()),
postActions = postActions,
)
}
@ -223,7 +220,6 @@ fun LobstersApp(
UserProfile(
username = username,
getProfile = viewModel::getUserProfile,
modifier = Modifier.padding(bottom = paddingValues.calculateBottomPadding()),
)
}
}