mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-22 12:48:15 +03:00
fix(extensions): Crash when the same extension appears multiple times in the list
This commit is contained in:
parent
00883792cd
commit
4fe7681992
2 changed files with 4 additions and 2 deletions
|
@ -38,6 +38,7 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import eu.kanade.core.util.fastDistinctBy
|
||||
import eu.kanade.presentation.browse.BaseBrowseItem
|
||||
import eu.kanade.presentation.browse.anime.components.AnimeExtensionIcon
|
||||
import eu.kanade.presentation.browse.manga.ExtensionHeader
|
||||
|
@ -185,7 +186,7 @@ private fun AnimeExtensionContent(
|
|||
}
|
||||
|
||||
items(
|
||||
items = items,
|
||||
items = items.fastDistinctBy { it.hashCode() },
|
||||
contentType = { "item" },
|
||||
key = { "extension-${it.hashCode()}" },
|
||||
) { item ->
|
||||
|
|
|
@ -41,6 +41,7 @@ import androidx.compose.ui.platform.LocalContext
|
|||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import dev.icerock.moko.resources.StringResource
|
||||
import eu.kanade.core.util.fastDistinctBy
|
||||
import eu.kanade.presentation.browse.BaseBrowseItem
|
||||
import eu.kanade.presentation.browse.manga.components.MangaExtensionIcon
|
||||
import eu.kanade.presentation.components.WarningBanner
|
||||
|
@ -187,7 +188,7 @@ private fun ExtensionContent(
|
|||
}
|
||||
|
||||
items(
|
||||
items = items,
|
||||
items = items.fastDistinctBy { it.hashCode() },
|
||||
contentType = { "item" },
|
||||
key = { "extension-${it.hashCode()}" },
|
||||
) { item ->
|
||||
|
|
Loading…
Reference in a new issue