fix(coil): Use original size if it has ratio

Should fix flickering (or at least reduced it)

Fixes GH-160
This commit is contained in:
Ahmad Ansori Palembani 2024-08-20 16:48:03 +07:00
parent d002642697
commit 5d29c0a6cf
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 4 additions and 0 deletions

View file

@ -15,6 +15,7 @@
## Fixes ## Fixes
- Fixed chapter number parsing (@Naputt1) - Fixed chapter number parsing (@Naputt1)
- Fixed (or at least reduced) library flickering
## Other ## Other
- Refactor chapter recognition (@stevenyomi) - Refactor chapter recognition (@stevenyomi)

View file

@ -13,6 +13,7 @@ import androidx.core.view.updateLayoutParams
import coil3.dispose import coil3.dispose
import coil3.size.Precision import coil3.size.Precision
import coil3.size.Scale import coil3.size.Scale
import coil3.size.Size
import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.coil.loadManga import eu.kanade.tachiyomi.data.coil.loadManga
import eu.kanade.tachiyomi.data.database.models.dominantCoverColors import eu.kanade.tachiyomi.data.database.models.dominantCoverColors
@ -131,6 +132,8 @@ class LibraryGridHolder(
if (!fixedSize && !hasRatio) { if (!fixedSize && !hasRatio) {
precision(Precision.INEXACT) precision(Precision.INEXACT)
scale(Scale.FIT) scale(Scale.FIT)
} else if (hasRatio) {
size(Size.ORIGINAL)
} }
listener( listener(
onSuccess = { _, _ -> onSuccess = { _, _ ->