mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 14:07:05 +05:30
android: skip unnecessary database call
This commit is contained in:
parent
684ec34ec9
commit
4124cdcd1b
2 changed files with 1 additions and 3 deletions
|
@ -186,7 +186,6 @@ fun LobstersApp(
|
|||
DatabasePosts(
|
||||
items = savedPosts,
|
||||
listState = savedListState,
|
||||
isSaved = viewModel::isPostSaved,
|
||||
postActions = postActions,
|
||||
modifier = Modifier.padding(bottom = paddingValues.calculateBottomPadding()),
|
||||
)
|
||||
|
|
|
@ -17,7 +17,6 @@ import java.time.Month
|
|||
fun DatabasePosts(
|
||||
items: Map<Month, List<SavedPost>>,
|
||||
listState: LazyListState,
|
||||
isSaved: suspend (SavedPost) -> Boolean,
|
||||
postActions: PostActions,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
|
@ -30,7 +29,7 @@ fun DatabasePosts(
|
|||
items(posts) { item ->
|
||||
ListItem(
|
||||
item = item,
|
||||
isSaved = isSaved,
|
||||
isSaved = { true },
|
||||
postActions = postActions,
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue