Moves NIP95 cache to internal/secure folders

This commit is contained in:
Vitor Pamplona
2023-08-04 12:32:36 -04:00
parent e8c8167451
commit 7b591c84f8
2 changed files with 2 additions and 2 deletions

View File

@@ -1086,7 +1086,7 @@ object LocalCache {
}
try {
val cachePath = File(Amethyst.instance.applicationContext.externalCacheDir, "NIP95")
val cachePath = File(Amethyst.instance.applicationContext.cacheDir, "NIP95")
cachePath.mkdirs()
val file = File(cachePath, event.id)
if (!file.exists()) {

View File

@@ -3232,7 +3232,7 @@ private fun ObserverAndRenderNIP95(
// Creates a new object when the event arrives to force an update of the image.
val note = noteState?.note
val uri = header.toNostrUri()
val localDir = note?.idHex?.let { File(File(appContext.externalCacheDir, "NIP95"), it) }
val localDir = note?.idHex?.let { File(File(appContext.cacheDir, "NIP95"), it) }
val blurHash = eventHeader.blurhash()
val dimensions = eventHeader.dimensions()
val description = eventHeader.content