From 6fbdbf65849ea4282906d4db3ff7f75d22ed9bc7 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Fri, 27 Mar 2026 09:01:38 -0500 Subject: [PATCH] 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> --- desktop/src/main/kotlin/org/meshtastic/desktop/Main.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/src/main/kotlin/org/meshtastic/desktop/Main.kt b/desktop/src/main/kotlin/org/meshtastic/desktop/Main.kt index f48380dbc..ea8562e21 100644 --- a/desktop/src/main/kotlin/org/meshtastic/desktop/Main.kt +++ b/desktop/src/main/kotlin/org/meshtastic/desktop/Main.kt @@ -244,11 +244,11 @@ fun main(args: Array) = 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 {