mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Don't compute key for browse list based on manga ID, which may be repeated
Fixes #9473
This commit is contained in:
parent
6f59c6c6bb
commit
71f6e07e71
3 changed files with 3 additions and 15 deletions
|
@ -11,7 +11,6 @@ import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.paging.LoadState
|
import androidx.paging.LoadState
|
||||||
import androidx.paging.compose.LazyPagingItems
|
import androidx.paging.compose.LazyPagingItems
|
||||||
import androidx.paging.compose.itemKey
|
|
||||||
import eu.kanade.presentation.library.components.CommonMangaItemDefaults
|
import eu.kanade.presentation.library.components.CommonMangaItemDefaults
|
||||||
import eu.kanade.presentation.library.components.MangaComfortableGridItem
|
import eu.kanade.presentation.library.components.MangaComfortableGridItem
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
|
@ -39,10 +38,7 @@ fun BrowseSourceComfortableGrid(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
items(
|
items(count = mangaList.itemCount) { index ->
|
||||||
count = mangaList.itemCount,
|
|
||||||
key = mangaList.itemKey { it.value.id },
|
|
||||||
) { index ->
|
|
||||||
val manga by mangaList[index]?.collectAsState() ?: return@items
|
val manga by mangaList[index]?.collectAsState() ?: return@items
|
||||||
BrowseSourceComfortableGridItem(
|
BrowseSourceComfortableGridItem(
|
||||||
manga = manga,
|
manga = manga,
|
||||||
|
|
|
@ -11,7 +11,6 @@ import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.paging.LoadState
|
import androidx.paging.LoadState
|
||||||
import androidx.paging.compose.LazyPagingItems
|
import androidx.paging.compose.LazyPagingItems
|
||||||
import androidx.paging.compose.itemKey
|
|
||||||
import eu.kanade.presentation.library.components.CommonMangaItemDefaults
|
import eu.kanade.presentation.library.components.CommonMangaItemDefaults
|
||||||
import eu.kanade.presentation.library.components.MangaCompactGridItem
|
import eu.kanade.presentation.library.components.MangaCompactGridItem
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
|
@ -39,10 +38,7 @@ fun BrowseSourceCompactGrid(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
items(
|
items(count = mangaList.itemCount) { index ->
|
||||||
count = mangaList.itemCount,
|
|
||||||
key = mangaList.itemKey { it.value.id },
|
|
||||||
) { index ->
|
|
||||||
val manga by mangaList[index]?.collectAsState() ?: return@items
|
val manga by mangaList[index]?.collectAsState() ?: return@items
|
||||||
BrowseSourceCompactGridItem(
|
BrowseSourceCompactGridItem(
|
||||||
manga = manga,
|
manga = manga,
|
||||||
|
|
|
@ -7,7 +7,6 @@ import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.paging.LoadState
|
import androidx.paging.LoadState
|
||||||
import androidx.paging.compose.LazyPagingItems
|
import androidx.paging.compose.LazyPagingItems
|
||||||
import androidx.paging.compose.itemKey
|
|
||||||
import eu.kanade.presentation.library.components.CommonMangaItemDefaults
|
import eu.kanade.presentation.library.components.CommonMangaItemDefaults
|
||||||
import eu.kanade.presentation.library.components.MangaListItem
|
import eu.kanade.presentation.library.components.MangaListItem
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
|
@ -32,10 +31,7 @@ fun BrowseSourceList(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
items(
|
items(count = mangaList.itemCount) { index ->
|
||||||
count = mangaList.itemCount,
|
|
||||||
key = mangaList.itemKey { it.value.id },
|
|
||||||
) { index ->
|
|
||||||
val manga by mangaList[index]?.collectAsState() ?: return@items
|
val manga by mangaList[index]?.collectAsState() ?: return@items
|
||||||
BrowseSourceListItem(
|
BrowseSourceListItem(
|
||||||
manga = manga,
|
manga = manga,
|
||||||
|
|
Loading…
Reference in a new issue