mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
chore(deps): Bump coil version and some code reformat
This commit is contained in:
parent
1d7fab08cf
commit
5785550e75
3 changed files with 11 additions and 4 deletions
|
@ -244,12 +244,17 @@ open class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.F
|
|||
val callFactoryLazy = lazy { Injekt.get<NetworkHelper>().client }
|
||||
val diskCacheLazy = lazy { CoilDiskCache.get(this@App) }
|
||||
components {
|
||||
// NetworkFetcher.Factory
|
||||
add(OkHttpNetworkFetcherFactory(callFactoryLazy::value))
|
||||
// Decoder.Factory
|
||||
add(TachiyomiImageDecoder.Factory())
|
||||
add(MangaCoverFetcher.Factory(callFactoryLazy, diskCacheLazy))
|
||||
add(MangaCoverKeyer())
|
||||
// Fetcher.Factory
|
||||
add(BufferedSourceFetcher.Factory())
|
||||
add(MangaCoverFetcher.Factory(callFactoryLazy, diskCacheLazy))
|
||||
// Keyer
|
||||
add(MangaCoverKeyer())
|
||||
}
|
||||
|
||||
diskCache(diskCacheLazy::value)
|
||||
memoryCache { MemoryCache.Builder().maxSizePercent(this@App, 0.40).build() }
|
||||
crossfade(true)
|
||||
|
@ -258,7 +263,8 @@ open class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.F
|
|||
if (BuildConfig.DEBUG) {
|
||||
logger(DebugLogger())
|
||||
}
|
||||
}.build()
|
||||
}
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue