mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 17:41:50 +01:00
Fix refreshing in manga details not fixing corrupt covers
This commit is contained in:
parent
59f27c494d
commit
dcf3f56a05
@ -232,7 +232,7 @@ class CoverCache(val context: Context) {
|
||||
val file = getCoverFile(manga)
|
||||
if (deleteCustom) deleteCustomCover(manga)
|
||||
if (file.exists()) {
|
||||
context.imageLoader.memoryCache.remove(MemoryCache.Key(file.name))
|
||||
context.imageLoader.memoryCache.remove(MemoryCache.Key(manga.key()))
|
||||
file.delete()
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ import android.graphics.Bitmap
|
||||
import android.net.Uri
|
||||
import android.os.Environment
|
||||
import coil.Coil
|
||||
import coil.imageLoader
|
||||
import coil.memory.MemoryCache
|
||||
import coil.request.CachePolicy
|
||||
import coil.request.ImageRequest
|
||||
import coil.request.Parameters
|
||||
@ -370,6 +372,7 @@ class MangaDetailsPresenter(
|
||||
.build()
|
||||
|
||||
if (Coil.imageLoader(preferences.context).execute(request) is SuccessResult) {
|
||||
preferences.context.imageLoader.memoryCache.remove(MemoryCache.Key(manga.key()))
|
||||
withContext(Dispatchers.Main) {
|
||||
controller.setPaletteColor()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user