Moves NIP95 cache to internal/secure folders
This commit is contained in:
@@ -1086,7 +1086,7 @@ object LocalCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val cachePath = File(Amethyst.instance.applicationContext.externalCacheDir, "NIP95")
|
val cachePath = File(Amethyst.instance.applicationContext.cacheDir, "NIP95")
|
||||||
cachePath.mkdirs()
|
cachePath.mkdirs()
|
||||||
val file = File(cachePath, event.id)
|
val file = File(cachePath, event.id)
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
|
|||||||
@@ -3232,7 +3232,7 @@ private fun ObserverAndRenderNIP95(
|
|||||||
// Creates a new object when the event arrives to force an update of the image.
|
// Creates a new object when the event arrives to force an update of the image.
|
||||||
val note = noteState?.note
|
val note = noteState?.note
|
||||||
val uri = header.toNostrUri()
|
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 blurHash = eventHeader.blurhash()
|
||||||
val dimensions = eventHeader.dimensions()
|
val dimensions = eventHeader.dimensions()
|
||||||
val description = eventHeader.content
|
val description = eventHeader.content
|
||||||
|
|||||||
Reference in New Issue
Block a user