Fix crashes related to MangaCover

This commit is contained in:
Jobobby04 2024-02-17 18:52:58 -05:00 committed by Cuong M. Tran
parent 67dbe5b9b8
commit 960b9a5b3c
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2

View file

@ -16,7 +16,12 @@ data class MangaCover(
val lastModified: Long,
) {
// SY -->
val url: String = getCustomMangaInfo.get(mangaId)?.thumbnailUrl ?: ogUrl!!
private val customThumbnailUrl = if (isMangaFavorite) {
getCustomMangaInfo.get(mangaId)?.thumbnailUrl
} else {
null
}
val url: String? = customThumbnailUrl ?: ogUrl
companion object {
private val getCustomMangaInfo: GetCustomMangaInfo by injectLazy()