mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-08-01 09:09:29 +00:00
feat: update DetailCastSection to use itemsIndexed for improved performance and unique key generation
This commit is contained in:
parent
8c99523aa2
commit
8108306ce8
2 changed files with 5 additions and 4 deletions
1
cloudstream-extensions-phisher
Submodule
1
cloudstream-extensions-phisher
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit da471dd5791e0be7f42cffb4f228a8f4d2291451
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue