Skip to content

Commit

Permalink
refactor a little
Browse files Browse the repository at this point in the history
  • Loading branch information
kid1412621 committed Jan 11, 2024
1 parent ebd26ff commit b1512dd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fun Base64Image(

if (isSvg) {
Image(
painter = base64ToPainter(String(base64ToBytes(base64Uri))),
painter = base64ToPainter(base64Uri),
modifier = modifier,
contentDescription = null
)
Expand All @@ -46,7 +46,7 @@ private fun base64ToBytes(base64String: String): ByteArray {
@Composable
private fun base64ToPainter(base64Str: String): Painter {
return remember(base64Str) {
val svg = SVG.getFromString(base64Str)
val svg = SVG.getFromString(String(base64ToBytes(base64Str)))
object : Painter() {
override val intrinsicSize: Size
get() {
Expand Down

0 comments on commit b1512dd

Please sign in to comment.