Lazily initialize image cache on background thread

This commit is contained in:
FooIbar committed 2024-02-03 18:04:42 +08:00
1 parent 2a7f65a1bd
commit e79113b19e
1 file changed
+1 -1
@@ -191,7 +191,7 @@ class EhApplication : Application(), SingletonImageLoader.Factory {
add(AnimatedImageDecoder.Factory(false))
}
}
diskCache(imageCache)
diskCache { imageCache }
crossfade(300)
val drawable = AppCompatResources.getDrawable(appCtx, R.drawable.image_failed)
if (drawable != null) error(drawable.asCoilImage(true))