From 1169c510bfea4ba3f3e9f749f2a9c808a3da4f9a Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 12 May 2020 20:06:49 +0200 Subject: [PATCH] Not closing dialog if an error occurred --- .../fints4java/android/ui/dialogs/TransferMoneyDialog.kt | 2 +- .../ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt index 6aecc4aa..13e9544e 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt @@ -252,7 +252,7 @@ open class TransferMoneyDialog : DialogFragment() { .show() } - if (response.isSuccessful || response.userCancelledAction) { + if (response.isSuccessful || response.userCancelledAction) { // do not close dialog if an error occurred this.dismiss() } } diff --git a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt index 502a435a..a654fcc8 100644 --- a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt +++ b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt @@ -272,7 +272,9 @@ open class TransferMoneyDialog @JvmOverloads constructor( transferData.amount, currency, transferData.creditorName, response.errorToShowToUser), null, response.error, currentStage) } - close() + if (response.isSuccessful || response.userCancelledAction) { // do not close dialog if an error occurred + close() + } } } \ No newline at end of file