diff --git a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/tan/EnterTanDialog.kt b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/tan/EnterTanDialog.kt index 1d8a4c3c..dc7af106 100644 --- a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/tan/EnterTanDialog.kt +++ b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/tan/EnterTanDialog.kt @@ -97,7 +97,7 @@ open class EnterTanDialog( } } else { - showDecodingTanChallengeFailedError(flickerCode.decodingError) + showDecodingTanChallengeFailedErrorOnViewInitialization(flickerCode.decodingError) } } @@ -113,7 +113,7 @@ open class EnterTanDialog( }) } else { - showDecodingTanChallengeFailedError(decodedImage.decodingError) + showDecodingTanChallengeFailedErrorOnViewInitialization(decodedImage.decodingError) } } @@ -184,6 +184,12 @@ open class EnterTanDialog( } + protected open fun showDecodingTanChallengeFailedErrorOnViewInitialization(error: Exception?) { + runLater { + showDecodingTanChallengeFailedError(error) + } + } + protected open fun showDecodingTanChallengeFailedError(error: Exception?) { dialogService.showErrorMessage(String.format(messages["enter.tan.dialog.error.could.not.decode.tan.image"], error?.localizedMessage), null, error, currentStage)