mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2025-01-11 14:29:08 +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
|
activity?.window?.statusBarColor = translucentColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getHeader()?.updateCover(presenter.manga, true)
|
getHeader()?.updateCover(presenter.manga)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onLoadCleared(placeholder: Drawable?) {}
|
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
|
if (!isCached(manga)) return
|
||||||
GlideApp.with(view.context).load(manga).diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
GlideApp.with(view.context).load(manga).diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||||
.signature(ObjectKey(MangaImpl.getLastCoverFetch(manga.id!!).toString()))
|
.signature(ObjectKey(MangaImpl.getLastCoverFetch(manga.id!!).toString()))
|
||||||
@ -318,6 +318,7 @@ class MangaHeaderHolder(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun isCached(manga: Manga): Boolean {
|
private fun isCached(manga: Manga): Boolean {
|
||||||
|
if (manga.source == LocalSource.ID) return true
|
||||||
val coverCache = adapter.delegate.mangaPresenter().coverCache
|
val coverCache = adapter.delegate.mangaPresenter().coverCache
|
||||||
manga.thumbnail_url?.let {
|
manga.thumbnail_url?.let {
|
||||||
return if (manga.favorite) coverCache.getCoverFile(it).exists()
|
return if (manga.favorite) coverCache.getCoverFile(it).exists()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user