From fd53b2f0053d63a51c2678c884320000651fcb18 Mon Sep 17 00:00:00 2001 From: dankito Date: Fri, 4 Oct 2024 01:27:42 +0200 Subject: [PATCH] Fixed resetting epcQrCodeGeneratingError (otherwise after first error always epcQrCodeGeneratingError would be displayed) --- .../net/codinux/banking/ui/screens/CreateEpcQrCodeScreen.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/screens/CreateEpcQrCodeScreen.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/screens/CreateEpcQrCodeScreen.kt index 18b6f2e..401e347 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/screens/CreateEpcQrCodeScreen.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/screens/CreateEpcQrCodeScreen.kt @@ -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() })