refactor: update key generation in ContinueWatchingSection and GridContinueWatchingSection for better uniqueness
This commit is contained in:
parent
582afcd7b3
commit
197b2f1901
2 changed files with 6 additions and 6 deletions
|
|
@ -121,10 +121,10 @@ fun ContinueWatchingSection(
|
|||
) {
|
||||
itemsIndexed(
|
||||
items = items,
|
||||
key = { _, progress ->
|
||||
key = { index, progress ->
|
||||
when (progress) {
|
||||
is ContinueWatchingItem.InProgress -> progress.progress.videoId
|
||||
is ContinueWatchingItem.NextUp -> "nextup_${progress.info.videoId}"
|
||||
is ContinueWatchingItem.InProgress -> "cw_${progress.progress.videoId}_$index"
|
||||
is ContinueWatchingItem.NextUp -> "nextup_${progress.info.videoId}_$index"
|
||||
}
|
||||
}
|
||||
) { index, progress ->
|
||||
|
|
|
|||
|
|
@ -78,10 +78,10 @@ fun GridContinueWatchingSection(
|
|||
) {
|
||||
itemsIndexed(
|
||||
items = items,
|
||||
key = { _, item ->
|
||||
key = { index, item ->
|
||||
when (item) {
|
||||
is ContinueWatchingItem.InProgress -> "cw_${item.progress.videoId}"
|
||||
is ContinueWatchingItem.NextUp -> "nextup_${item.info.videoId}"
|
||||
is ContinueWatchingItem.InProgress -> "cw_${item.progress.videoId}_$index"
|
||||
is ContinueWatchingItem.NextUp -> "nextup_${item.info.videoId}_$index"
|
||||
}
|
||||
}
|
||||
) { index, progress ->
|
||||
|
|
|
|||
Loading…
Reference in a new issue