mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-29 08:00:05 +00:00
multiplatform/common: catch every exception at base64ToBitmap (#6576)
Co-authored-by: shum <github.shum@liber.li>
This commit is contained in:
@@ -27,7 +27,7 @@ actual fun base64ToBitmap(base64ImageString: String): ImageBitmap {
|
||||
.removePrefix("data:image/jpg;base64,")
|
||||
return try {
|
||||
ImageIO.read(ByteArrayInputStream(Base64.getMimeDecoder().decode(imageString))).toComposeImageBitmap()
|
||||
} catch (e: IOException) {
|
||||
} catch (e: Throwable) {
|
||||
Log.e(TAG, "base64ToBitmap error: $e")
|
||||
errorBitmap()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user