Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
Closes #1731
  • Loading branch information
Milan-Cerovsky committed Feb 4, 2025
1 parent 0cbc46d commit 76366b3
Showing 1 changed file with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package co.electriccoin.zcash.ui.design.component

import android.util.Log
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.Image
import androidx.compose.foundation.clickable
Expand Down Expand Up @@ -108,7 +107,7 @@ private fun ZashiQrInternal(
modifier: Modifier = Modifier,
) {
val qrSizePx = with(LocalDensity.current) { qrSize.roundToPx() }
var bitmap: ImageBitmap? by remember {
var bitmap: ImageBitmap by remember {
mutableStateOf(getQrCode(state.qrData, qrSizePx, colors))
}

Expand All @@ -131,17 +130,11 @@ private fun ZashiQrInternal(
Box(
modifier = Modifier.padding(contentPadding)
) {
if (bitmap == null) {
Box(modifier = Modifier.size(qrSize))
} else {
bitmap?.let {
Image(
modifier = Modifier,
bitmap = it,
contentDescription = state.contentDescription?.getValue(),
)
}
}
Image(
modifier = Modifier,
bitmap = bitmap,
contentDescription = state.contentDescription?.getValue(),
)

if (centerImageResId != null) {
Image(
Expand Down

0 comments on commit 76366b3

Please sign in to comment.