mirror of
https://github.com/bbara04/Purefin.git
synced 2026-07-22 17:41:39 +00:00
feat: filter watched items from the Continue Watching section
This commit is contained in:
@@ -26,9 +26,11 @@ fun ContinueWatchingSection(
|
||||
) {
|
||||
if (items.isEmpty()) return
|
||||
|
||||
val filteredItems = items.filter { !it.watched }
|
||||
|
||||
val listState = rememberLazyListState()
|
||||
|
||||
LaunchedEffect(items) {
|
||||
LaunchedEffect(filteredItems) {
|
||||
listState.scrollToItem(index = 0)
|
||||
}
|
||||
|
||||
@@ -44,7 +46,7 @@ fun ContinueWatchingSection(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
state = listState
|
||||
) {
|
||||
itemsIndexed(items = items, key = { _, item -> item.id }) { index, item ->
|
||||
itemsIndexed(items = filteredItems, key = { _, item -> item.id }) { index, item ->
|
||||
ContinueWatchingCard(
|
||||
item = item,
|
||||
sharedBoundsKey = homeMediaSharedBoundsKey("continue-$index", item.id),
|
||||
|
||||
Reference in New Issue
Block a user