From 1a20256aa64cfbb2b5cfe2ff4206cb230554cdab Mon Sep 17 00:00:00 2001 From: greenart7c3 Date: Fri, 6 Mar 2026 13:06:41 -0300 Subject: [PATCH] Remove redundant Context cast in Amber.kt The `context` variable in Coil's `newImageLoader` already provides the necessary properties, so the explicit cast to `Context` when resolving the image cache directory is unnecessary. --- app/src/main/java/com/greenart7c3/nostrsigner/Amber.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/greenart7c3/nostrsigner/Amber.kt b/app/src/main/java/com/greenart7c3/nostrsigner/Amber.kt index 738aa78e..e2e6f686 100644 --- a/app/src/main/java/com/greenart7c3/nostrsigner/Amber.kt +++ b/app/src/main/java/com/greenart7c3/nostrsigner/Amber.kt @@ -3,7 +3,6 @@ package com.greenart7c3.nostrsigner import android.app.AlarmManager import android.app.Application import android.app.PendingIntent -import android.content.Context import android.content.Intent import android.net.NetworkCapabilities import android.util.Log @@ -410,7 +409,7 @@ class Amber : .maxSizeBytes(32 * 1024 * 1024) // 32 MB cap to prevent DMA-BUF OOM .build() val diskCache = DiskCache.Builder() - .directory((context as Context).cacheDir.resolve("coil_image_cache").toOkioPath()) + .directory(context.cacheDir.resolve("coil_image_cache").toOkioPath()) .maxSizeBytes(10 * 1024 * 1024) // 10 MB .build() val coilCallFactory = okhttp3.Call.Factory { request ->