Fix cover fetching in compose views (#7315)
Make sure it passed thru the custom fetcher
(cherry picked from commit 1b804e61cb)
# Conflicts:
# app/src/main/java/eu/kanade/data/history/HistoryMapper.kt
# app/src/main/java/eu/kanade/domain/history/model/HistoryWithRelations.kt
# app/src/main/java/eu/kanade/tachiyomi/App.kt
This commit is contained in:
@@ -2,6 +2,7 @@ package eu.kanade.data.history
|
||||
|
||||
import eu.kanade.domain.history.model.History
|
||||
import eu.kanade.domain.history.model.HistoryWithRelations
|
||||
import eu.kanade.domain.manga.model.MangaCover
|
||||
import java.util.Date
|
||||
|
||||
val historyMapper: (Long, Long, Date?, Long) -> History = { id, chapterId, readAt, readDuration ->
|
||||
@@ -13,8 +14,8 @@ val historyMapper: (Long, Long, Date?, Long) -> History = { id, chapterId, readA
|
||||
)
|
||||
}
|
||||
|
||||
val historyWithRelationsMapper: (Long, Long, Long, String, String?, Float, Date?, Long) -> HistoryWithRelations = {
|
||||
historyId, mangaId, chapterId, title, thumbnailUrl, chapterNumber, readAt, readDuration ->
|
||||
val historyWithRelationsMapper: (Long, Long, Long, String, String?, Long, Boolean, Long, Float, Date?, Long) -> HistoryWithRelations = {
|
||||
historyId, mangaId, chapterId, title, thumbnailUrl, sourceId, isFavorite, coverLastModified, chapterNumber, readAt, readDuration ->
|
||||
HistoryWithRelations(
|
||||
id = historyId,
|
||||
chapterId = chapterId,
|
||||
@@ -22,9 +23,15 @@ val historyWithRelationsMapper: (Long, Long, Long, String, String?, Float, Date?
|
||||
// SY -->
|
||||
ogTitle = title,
|
||||
// SY <--
|
||||
thumbnailUrl = thumbnailUrl ?: "",
|
||||
chapterNumber = chapterNumber,
|
||||
readAt = readAt,
|
||||
readDuration = readDuration,
|
||||
coverData = MangaCover(
|
||||
mangaId = mangaId,
|
||||
sourceId = sourceId,
|
||||
isMangaFavorite = isFavorite,
|
||||
url = thumbnailUrl,
|
||||
lastModified = coverLastModified,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user