Trying workaround for #296

This commit is contained in:
len 2016-05-09 13:29:46 +02:00
parent c20d86e5c0
commit 136136d055

View File

@ -55,6 +55,7 @@ class LibraryHolder(private val view: View, private val adapter: LibraryCategory
* @param coverCache the cache that stores the cover in the filesystem. * @param coverCache the cache that stores the cover in the filesystem.
*/ */
private fun loadCover(manga: Manga, source: Source, coverCache: CoverCache) { private fun loadCover(manga: Manga, source: Source, coverCache: CoverCache) {
Glide.clear(view.thumbnail)
if (!manga.thumbnail_url.isNullOrEmpty()) { if (!manga.thumbnail_url.isNullOrEmpty()) {
coverCache.saveOrLoadFromCache(manga.thumbnail_url, source.glideHeaders) { coverCache.saveOrLoadFromCache(manga.thumbnail_url, source.glideHeaders) {
if (adapter.fragment.isResumed && this.manga == manga) { if (adapter.fragment.isResumed && this.manga == manga) {
@ -67,8 +68,6 @@ class LibraryHolder(private val view: View, private val adapter: LibraryCategory
.into(itemView.thumbnail) .into(itemView.thumbnail)
} }
} }
} else {
Glide.clear(view.thumbnail)
} }
} }