Fix cover fetching in compose views (#7315)

Make sure it passed thru the custom fetcher
This commit is contained in:
Ivan Iskandar
2022-06-18 09:21:29 +07:00
committed by GitHub
parent 02eb3cb6b5
commit 1b804e61cb
11 changed files with 147 additions and 9 deletions

View File

@@ -21,7 +21,7 @@ enum class MangaCover(private val ratio: Float) {
@Composable
operator fun invoke(
modifier: Modifier = Modifier,
data: String?,
data: Any?,
contentDescription: String? = null,
shape: Shape? = null,
) {

View File

@@ -191,7 +191,7 @@ fun HistoryItem(
modifier = Modifier
.fillMaxHeight()
.clickable(onClick = onClickCover),
data = history.thumbnailUrl,
data = history.coverData,
)
Column(
modifier = Modifier

View File

@@ -47,7 +47,7 @@ private val defaultCover: @Composable RowScope.(Manga, () -> Unit) -> Unit = { m
.padding(vertical = 8.dp)
.clickable(onClick = onClick)
.fillMaxHeight(),
data = manga.thumbnailUrl,
data = manga,
)
}