Revert "Re-Add Animated Image Decoders to Coil"
This reverts commit 5d1b1408eb78d94912c36cfbe63ee7663f3c1bb4.
This commit is contained in:
parent
6799f9b6f7
commit
2708ddef70
2 changed files with 0 additions and 10 deletions
|
|
@ -19,8 +19,6 @@ import coil3.ImageLoader
|
||||||
import coil3.SingletonImageLoader
|
import coil3.SingletonImageLoader
|
||||||
import coil3.disk.DiskCache
|
import coil3.disk.DiskCache
|
||||||
import coil3.disk.directory
|
import coil3.disk.directory
|
||||||
import coil3.gif.AnimatedImageDecoder
|
|
||||||
import coil3.gif.GifDecoder
|
|
||||||
import coil3.network.okhttp.OkHttpNetworkFetcherFactory
|
import coil3.network.okhttp.OkHttpNetworkFetcherFactory
|
||||||
import coil3.request.allowRgb565
|
import coil3.request.allowRgb565
|
||||||
import coil3.request.crossfade
|
import coil3.request.crossfade
|
||||||
|
|
@ -186,11 +184,6 @@ class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.Factor
|
||||||
val callFactoryLazy = lazy { Injekt.get<NetworkHelper>().client }
|
val callFactoryLazy = lazy { Injekt.get<NetworkHelper>().client }
|
||||||
val diskCacheLazy = lazy { CoilDiskCache.get(this@App) }
|
val diskCacheLazy = lazy { CoilDiskCache.get(this@App) }
|
||||||
components {
|
components {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
|
||||||
add(AnimatedImageDecoder.Factory())
|
|
||||||
} else {
|
|
||||||
add(GifDecoder.Factory())
|
|
||||||
}
|
|
||||||
add(OkHttpNetworkFetcherFactory(callFactoryLazy::value))
|
add(OkHttpNetworkFetcherFactory(callFactoryLazy::value))
|
||||||
add(TachiyomiImageDecoder.Factory())
|
add(TachiyomiImageDecoder.Factory())
|
||||||
add(MangaCoverFetcher.MangaFactory(callFactoryLazy, diskCacheLazy))
|
add(MangaCoverFetcher.MangaFactory(callFactoryLazy, diskCacheLazy))
|
||||||
|
|
|
||||||
|
|
@ -91,9 +91,6 @@ object ImageUtil {
|
||||||
// Coil supports animated WebP on Android 9.0+
|
// Coil supports animated WebP on Android 9.0+
|
||||||
// https://coil-kt.github.io/coil/getting_started/#supported-image-formats
|
// https://coil-kt.github.io/coil/getting_started/#supported-image-formats
|
||||||
Format.Webp -> type.isAnimated && Build.VERSION.SDK_INT >= Build.VERSION_CODES.P
|
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
|
else -> false
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue