Revert "Re-Add Animated Image Decoders to Coil"

This reverts commit 5d1b1408eb78d94912c36cfbe63ee7663f3c1bb4.
This commit is contained in:
Jobobby04 2024-03-18 09:42:22 -04:00
parent 5d1b1408eb
commit 0767526f18
2 changed files with 0 additions and 10 deletions

View File

@ -19,8 +19,6 @@ import coil3.ImageLoader
import coil3.SingletonImageLoader
import coil3.disk.DiskCache
import coil3.disk.directory
import coil3.gif.AnimatedImageDecoder
import coil3.gif.GifDecoder
import coil3.network.okhttp.OkHttpNetworkFetcherFactory
import coil3.request.allowRgb565
import coil3.request.crossfade
@ -184,11 +182,6 @@ class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.Factor
val callFactoryLazy = lazy { Injekt.get<NetworkHelper>().client }
val diskCacheLazy = lazy { CoilDiskCache.get(this@App) }
components {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
add(AnimatedImageDecoder.Factory())
} else {
add(GifDecoder.Factory())
}
add(OkHttpNetworkFetcherFactory(callFactoryLazy::value))
add(TachiyomiImageDecoder.Factory())
add(MangaCoverFetcher.MangaFactory(callFactoryLazy, diskCacheLazy))

View File

@ -91,9 +91,6 @@ object ImageUtil {
// Coil supports animated WebP on Android 9.0+
// https://coil-kt.github.io/coil/getting_started/#supported-image-formats
Format.Webp -> type.isAnimated && Build.VERSION.SDK_INT >= Build.VERSION_CODES.P
// Coil supports animated Heif on Android 11+
// https://coil-kt.github.io/coil/getting_started/#supported-image-formats
Format.Heif -> type.isAnimated && Build.VERSION.SDK_INT >= Build.VERSION_CODES.R
else -> false
}
} catch (e: Exception) {