mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 05:49:16 +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)
|
val file = getCoverFile(manga)
|
||||||
if (deleteCustom) deleteCustomCover(manga)
|
if (deleteCustom) deleteCustomCover(manga)
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
context.imageLoader.memoryCache.remove(MemoryCache.Key(file.name))
|
context.imageLoader.memoryCache.remove(MemoryCache.Key(manga.key()))
|
||||||
file.delete()
|
file.delete()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,8 @@ import android.graphics.Bitmap
|
|||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Environment
|
import android.os.Environment
|
||||||
import coil.Coil
|
import coil.Coil
|
||||||
|
import coil.imageLoader
|
||||||
|
import coil.memory.MemoryCache
|
||||||
import coil.request.CachePolicy
|
import coil.request.CachePolicy
|
||||||
import coil.request.ImageRequest
|
import coil.request.ImageRequest
|
||||||
import coil.request.Parameters
|
import coil.request.Parameters
|
||||||
@ -370,6 +372,7 @@ class MangaDetailsPresenter(
|
|||||||
.build()
|
.build()
|
||||||
|
|
||||||
if (Coil.imageLoader(preferences.context).execute(request) is SuccessResult) {
|
if (Coil.imageLoader(preferences.context).execute(request) is SuccessResult) {
|
||||||
|
preferences.context.imageLoader.memoryCache.remove(MemoryCache.Key(manga.key()))
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
controller.setPaletteColor()
|
controller.setPaletteColor()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user