mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-20 17:11:32 -08:00
Fix closing stream for preview
This commit is contained in:
1 parent
9d182b8299
commit
e911eea69c
1 file changed
+5
-2
@@ -77,8 +77,11 @@ data class Attachment(var name: String,
|
||||
val asyncResult: Deferred<Bitmap?> = async {
|
||||
runCatching {
|
||||
binaryCipherKey?.let { binaryKey ->
|
||||
BitmapFactory.decodeStream(attachment.binaryAttachment
|
||||
.getUnGzipInputDataStream(binaryKey))
|
||||
var bitmap: Bitmap?
|
||||
attachment.binaryAttachment.getUnGzipInputDataStream(binaryKey).use { bitmapInputStream ->
|
||||
bitmap = BitmapFactory.decodeStream(bitmapInputStream)
|
||||
}
|
||||
bitmap
|
||||
}
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user