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:
James Rich
2026-03-27 09:01:38 -05:00
parent 07ff900ef5
commit 6fbdbf6584

View File

@@ -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 {