mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 23:51:53 +01:00
Fix manga covers from browse or extension intents sometimes not showing
This commit is contained in:
parent
ee42eb347f
commit
59c98f03d5
@ -85,6 +85,7 @@ class MangaFetcher : Fetcher<Manga> {
|
||||
shouldFetchRemotely
|
||||
)
|
||||
|
||||
if (options.diskCachePolicy.writeEnabled) {
|
||||
val tmpFile = File(coverFile.absolutePath + "_tmp")
|
||||
body.source().use { input ->
|
||||
tmpFile.sink().buffer().use { output ->
|
||||
@ -102,6 +103,7 @@ class MangaFetcher : Fetcher<Manga> {
|
||||
if (manga.favorite) {
|
||||
coverCache.deleteCachedCovers()
|
||||
}
|
||||
}
|
||||
return fileLoader(coverFile)
|
||||
}
|
||||
|
||||
|
@ -12,11 +12,9 @@ import androidx.core.view.isInvisible
|
||||
import androidx.core.view.isVisible
|
||||
import coil.loadAny
|
||||
import coil.request.CachePolicy
|
||||
import coil.request.Parameters
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
import eu.kanade.tachiyomi.data.image.coil.MangaFetcher
|
||||
import eu.kanade.tachiyomi.databinding.MangaHeaderItemBinding
|
||||
import eu.kanade.tachiyomi.source.LocalSource
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
@ -329,7 +327,8 @@ class MangaHeaderHolder(
|
||||
builder = {
|
||||
placeholder(drawable)
|
||||
error(drawable)
|
||||
if (manga.favorite) networkCachePolicy(CachePolicy.DISABLED)
|
||||
if (manga.favorite) networkCachePolicy(CachePolicy.READ_ONLY)
|
||||
diskCachePolicy(CachePolicy.READ_ONLY)
|
||||
}
|
||||
)
|
||||
binding.backdrop.loadAny(
|
||||
@ -337,7 +336,8 @@ class MangaHeaderHolder(
|
||||
builder = {
|
||||
placeholder(drawable)
|
||||
error(drawable)
|
||||
if (manga.favorite) networkCachePolicy(CachePolicy.DISABLED)
|
||||
if (manga.favorite) networkCachePolicy(CachePolicy.READ_ONLY)
|
||||
diskCachePolicy(CachePolicy.READ_ONLY)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user