diff --git a/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt index 936f57b29..25c28fad0 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt @@ -109,19 +109,19 @@ private fun ExtensionContent( ) { items( items = state.items, - key = { - when (it) { - is ExtensionUiModel.Header.Resource -> it.textRes - is ExtensionUiModel.Header.Text -> it.text - is ExtensionUiModel.Item -> it.key() - } - }, contentType = { when (it) { is ExtensionUiModel.Item -> "item" else -> "header" } }, + key = { + when (it) { + is ExtensionUiModel.Header.Resource -> it.textRes + is ExtensionUiModel.Header.Text -> it.text + is ExtensionUiModel.Item -> "extension-${it.key()}" + } + }, ) { item -> when (item) { is ExtensionUiModel.Header.Resource -> { diff --git a/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt index 9b14dc70e..790473260 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt @@ -112,7 +112,7 @@ private fun MigrateSourceList( items( items = list, - key = { (source, _) -> source.id }, + key = { (source, _) -> "migrate-${source.id}" }, ) { (source, count) -> MigrateSourceItem( modifier = Modifier.animateItemPlacement(), diff --git a/app/src/main/java/eu/kanade/presentation/browse/SourcesFilterScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/SourcesFilterScreen.kt index 56e1c3d66..9e7bf4722 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/SourcesFilterScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/SourcesFilterScreen.kt @@ -86,7 +86,7 @@ private fun SourcesFilterContent( key = { when (it) { is FilterUiModel.Header -> it.hashCode() - is FilterUiModel.Item -> it.source.key() + is FilterUiModel.Item -> "source-filter-${it.source.key()}" } }, ) { model -> diff --git a/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt index 94b7b45b5..3dfccc6d4 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt @@ -95,7 +95,7 @@ private fun SourceList( key = { when (it) { is SourceUiModel.Header -> it.hashCode() - is SourceUiModel.Item -> it.source.key() + is SourceUiModel.Item -> "source-${it.source.key()}" } }, ) { model -> diff --git a/app/src/main/java/eu/kanade/presentation/category/components/CategoryContent.kt b/app/src/main/java/eu/kanade/presentation/category/components/CategoryContent.kt index 0b0f24852..b1cc6c97b 100644 --- a/app/src/main/java/eu/kanade/presentation/category/components/CategoryContent.kt +++ b/app/src/main/java/eu/kanade/presentation/category/components/CategoryContent.kt @@ -28,7 +28,7 @@ fun CategoryContent( ) { itemsIndexed( items = categories, - key = { _, category -> category.id }, + key = { _, category -> "category-${category.id}" }, ) { index, category -> CategoryListItem( modifier = Modifier.animateItemPlacement(), diff --git a/app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt b/app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt index 2f976bb48..1be654d77 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt @@ -645,7 +645,7 @@ private fun LazyListScope.sharedChapterItems( ) { items( items = chapters, - key = { it.chapter.id }, + key = { "chapter-${it.chapter.id}" }, contentType = { MangaScreenItem.CHAPTER }, ) { chapterItem -> val haptic = LocalHapticFeedback.current diff --git a/app/src/main/java/eu/kanade/presentation/updates/UpdatesUiItem.kt b/app/src/main/java/eu/kanade/presentation/updates/UpdatesUiItem.kt index 0ca5d7d5f..5d2552ea6 100644 --- a/app/src/main/java/eu/kanade/presentation/updates/UpdatesUiItem.kt +++ b/app/src/main/java/eu/kanade/presentation/updates/UpdatesUiItem.kt @@ -93,7 +93,7 @@ fun LazyListScope.updatesUiItems( key = { when (it) { is UpdatesUiModel.Header -> it.hashCode() - is UpdatesUiModel.Item -> it.item.update.chapterId + is UpdatesUiModel.Item -> "updates-${it.item.update.chapterId}" } }, ) { item ->