mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-10 01:55:06 +01:00
Fix local covers not showing in details
This commit is contained in:
parent
5f6210b263
commit
76d82eb336
@ -344,7 +344,7 @@ class MangaDetailsController : BaseController,
|
||||
activity?.window?.statusBarColor = translucentColor
|
||||
}
|
||||
}
|
||||
getHeader()?.updateCover(presenter.manga, true)
|
||||
getHeader()?.updateCover(presenter.manga)
|
||||
}
|
||||
|
||||
override fun onLoadCleared(placeholder: Drawable?) {}
|
||||
|
@ -307,7 +307,7 @@ class MangaHeaderHolder(
|
||||
}
|
||||
}
|
||||
|
||||
fun updateCover(manga: Manga, force: Boolean = false) {
|
||||
fun updateCover(manga: Manga) {
|
||||
if (!isCached(manga)) return
|
||||
GlideApp.with(view.context).load(manga).diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
.signature(ObjectKey(MangaImpl.getLastCoverFetch(manga.id!!).toString()))
|
||||
@ -318,6 +318,7 @@ class MangaHeaderHolder(
|
||||
}
|
||||
|
||||
private fun isCached(manga: Manga): Boolean {
|
||||
if (manga.source == LocalSource.ID) return true
|
||||
val coverCache = adapter.delegate.mangaPresenter().coverCache
|
||||
manga.thumbnail_url?.let {
|
||||
return if (manga.favorite) coverCache.getCoverFile(it).exists()
|
||||
|
Loading…
Reference in New Issue
Block a user