From 8108306ce8d4325337e07cb5d36ba9340539c3cb Mon Sep 17 00:00:00 2001 From: tapframe <85391825+tapframe@users.noreply.github.com> Date: Tue, 31 Mar 2026 21:42:56 +0530 Subject: [PATCH] feat: update DetailCastSection to use itemsIndexed for improved performance and unique key generation --- cloudstream-extensions-phisher | 1 + .../app/features/details/components/DetailCastSection.kt | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 160000 cloudstream-extensions-phisher diff --git a/cloudstream-extensions-phisher b/cloudstream-extensions-phisher new file mode 160000 index 00000000..da471dd5 --- /dev/null +++ b/cloudstream-extensions-phisher @@ -0,0 +1 @@ +Subproject commit da471dd5791e0be7f42cffb4f228a8f4d2291451 diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/details/components/DetailCastSection.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/details/components/DetailCastSection.kt index 352eedb4..a1d384ae 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/details/components/DetailCastSection.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/details/components/DetailCastSection.kt @@ -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,