feat: update DetailCastSection to use itemsIndexed for improved performance and unique key generation

This commit is contained in:
tapframe 2026-03-31 21:42:56 +05:30
parent 8c99523aa2
commit 8108306ce8
2 changed files with 5 additions and 4 deletions

@ -0,0 +1 @@
Subproject commit da471dd5791e0be7f42cffb4f228a8f4d2291451

View file

@ -9,7 +9,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.ui.draw.clip
import androidx.compose.material3.MaterialTheme
@ -44,10 +44,10 @@ fun DetailCastSection(
LazyRow(
horizontalArrangement = Arrangement.spacedBy(sizing.avatarGap),
) {
items(
itemsIndexed(
items = cast,
key = { it.name },
) { person ->
key = { index, person -> "${person.name}-${person.role.orEmpty()}-${person.photo.orEmpty()}-$index" },
) { _, person ->
CastItem(
person = person,
sizing = sizing,