mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-27 18:21:58 -04:00
refactor(desktop): update image loader cache version and SVG decoding
This commit updates the image loading configuration for the desktop application to improve asset handling and manage cache versioning. Specific changes include: - Updated the image disk cache directory path to `image_cache_v3`. - Configured `SvgDecoder.Factory` with `renderToBitmap = false` to change how SVG assets are processed by the image loader. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
@@ -244,11 +244,11 @@ fun main(args: Array<String>) = application(exitProcessOnExit = false) {
|
||||
},
|
||||
) {
|
||||
setSingletonImageLoaderFactory { context ->
|
||||
val cacheDir = System.getProperty("user.home") + "/.meshtastic/image_cache"
|
||||
val cacheDir = System.getProperty("user.home") + "/.meshtastic/image_cache_v3"
|
||||
ImageLoader.Builder(context)
|
||||
.components {
|
||||
add(KtorNetworkFetcherFactory())
|
||||
add(SvgDecoder.Factory())
|
||||
add(SvgDecoder.Factory(renderToBitmap = false))
|
||||
}
|
||||
.memoryCache { MemoryCache.Builder().maxSizeBytes(MEMORY_CACHE_MAX_BYTES).build() }
|
||||
.diskCache {
|
||||
|
||||
Reference in New Issue
Block a user