diff --git a/app/src/main/java/com/greenart7c3/nostrsigner/Amber.kt b/app/src/main/java/com/greenart7c3/nostrsigner/Amber.kt index 3f9c0e2c..533a4fa1 100644 --- a/app/src/main/java/com/greenart7c3/nostrsigner/Amber.kt +++ b/app/src/main/java/com/greenart7c3/nostrsigner/Amber.kt @@ -356,6 +356,13 @@ class Amber : instance = this stats.createNotificationChannel() Thread.setDefaultUncaughtExceptionHandler(UnexpectedCrashSaver(crashReportCache, applicationIOScope)) + + // Build Coil's singleton ImageLoader off the main thread. Its factory + // (newImageLoader) touches cacheDir, so letting the first AsyncImage + // build it lazily during composition trips StrictMode's DiskReadViolation. + applicationIOScope.launch { + SingletonImageLoader.get(this@Amber) + } } private fun enableStrictMode() {