Don't compute key for browse list based on manga ID, which may be repeated
Fixes #9473 (cherry picked from commit 71f6e07e71a0ba6e6499512e3dd719a60f5d7314) # Conflicts: # app/src/main/java/eu/kanade/presentation/browse/components/BrowseSourceComfortableGrid.kt # app/src/main/java/eu/kanade/presentation/browse/components/BrowseSourceCompactGrid.kt # app/src/main/java/eu/kanade/presentation/browse/components/BrowseSourceList.kt
This commit is contained in:
parent
98e94ef7ae
commit
57d41b6682
@ -15,7 +15,6 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.paging.LoadState
|
||||
import androidx.paging.compose.LazyPagingItems
|
||||
import androidx.paging.compose.itemKey
|
||||
import eu.kanade.presentation.library.components.CommonMangaItemDefaults
|
||||
import eu.kanade.presentation.library.components.MangaComfortableGridItem
|
||||
import eu.kanade.tachiyomi.R
|
||||
@ -47,12 +46,7 @@ fun BrowseSourceComfortableGrid(
|
||||
}
|
||||
}
|
||||
|
||||
items(
|
||||
count = mangaList.itemCount,
|
||||
// SY -->
|
||||
key = mangaList.itemKey { it.value.first.id },
|
||||
// SY <--
|
||||
) { index ->
|
||||
items(count = mangaList.itemCount) { index ->
|
||||
// SY -->
|
||||
val pair by mangaList[index]?.collectAsState() ?: return@items
|
||||
val manga = pair.first
|
||||
|
@ -15,7 +15,6 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.paging.LoadState
|
||||
import androidx.paging.compose.LazyPagingItems
|
||||
import androidx.paging.compose.itemKey
|
||||
import eu.kanade.presentation.library.components.CommonMangaItemDefaults
|
||||
import eu.kanade.presentation.library.components.MangaCompactGridItem
|
||||
import eu.kanade.tachiyomi.R
|
||||
@ -47,12 +46,7 @@ fun BrowseSourceCompactGrid(
|
||||
}
|
||||
}
|
||||
|
||||
items(
|
||||
count = mangaList.itemCount,
|
||||
// SY -->
|
||||
key = mangaList.itemKey { it.value.first.id },
|
||||
// SY <--
|
||||
) { index ->
|
||||
items(count = mangaList.itemCount) { index ->
|
||||
// SY -->
|
||||
val pair by mangaList[index]?.collectAsState() ?: return@items
|
||||
val manga = pair.first
|
||||
|
@ -30,7 +30,6 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.paging.LoadState
|
||||
import androidx.paging.compose.LazyPagingItems
|
||||
import androidx.paging.compose.itemKey
|
||||
import com.gowtham.ratingbar.RatingBar
|
||||
import com.gowtham.ratingbar.RatingBarConfig
|
||||
import eu.kanade.presentation.manga.components.MangaCover
|
||||
@ -66,10 +65,7 @@ fun BrowseSourceEHentaiList(
|
||||
}
|
||||
}
|
||||
|
||||
items(
|
||||
count = mangaList.itemCount,
|
||||
key = mangaList.itemKey { it.value.first.id },
|
||||
) { index ->
|
||||
items(count = mangaList.itemCount) { index ->
|
||||
val pair by mangaList[index]?.collectAsState() ?: return@items
|
||||
val manga = pair.first
|
||||
val metadata = pair.second
|
||||
|
@ -11,7 +11,6 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.paging.LoadState
|
||||
import androidx.paging.compose.LazyPagingItems
|
||||
import androidx.paging.compose.itemKey
|
||||
import eu.kanade.presentation.library.components.CommonMangaItemDefaults
|
||||
import eu.kanade.presentation.library.components.MangaListItem
|
||||
import eu.kanade.tachiyomi.R
|
||||
@ -40,12 +39,7 @@ fun BrowseSourceList(
|
||||
}
|
||||
}
|
||||
|
||||
items(
|
||||
count = mangaList.itemCount,
|
||||
// SY -->
|
||||
key = mangaList.itemKey { it.value.first.id },
|
||||
// SY <--
|
||||
) { index ->
|
||||
items(count = mangaList.itemCount) { index ->
|
||||
// SY -->
|
||||
val pair by mangaList[index]?.collectAsState() ?: return@items
|
||||
val manga = pair.first
|
||||
|
Loading…
x
Reference in New Issue
Block a user