Fixed resetting epcQrCodeGeneratingError (otherwise after first error always epcQrCodeGeneratingError would be displayed)

This commit is contained in:
dankito 2024-10-04 01:27:42 +02:00
parent 5d00bbf77e
commit fd53b2f005
1 changed files with 2 additions and 0 deletions

View File

@ -64,6 +64,8 @@ fun CreateEpcQrCodeScreen(onClosed: () -> Unit) {
val epcQrCodeBytes by remember(receiverName, iban, bic, amount, reference, informationForUser) {
derivedStateOf {
epcQrCodeGeneratingError = null
if (receiverName.isNotBlank() && iban.isNotBlank()) {
try {
epcQrCodeService.generateEpcQrCode(receiverName, iban, bic.takeUnless { it.isBlank() }, amount.takeUnless { it.isBlank() }, reference.takeUnless { it.isBlank() }, informationForUser.takeUnless { it.isBlank() })