Fixed that at view initialization window is still null and therefore call to currentStage for dialogService.showErrorMessage() crashes
This commit is contained in:
parent
0e0d553c0b
commit
ed5d4bb241
|
@ -97,7 +97,7 @@ open class EnterTanDialog(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showDecodingTanChallengeFailedError(flickerCode.decodingError)
|
showDecodingTanChallengeFailedErrorOnViewInitialization(flickerCode.decodingError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ open class EnterTanDialog(
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
else {
|
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?) {
|
protected open fun showDecodingTanChallengeFailedError(error: Exception?) {
|
||||||
dialogService.showErrorMessage(String.format(messages["enter.tan.dialog.error.could.not.decode.tan.image"], error?.localizedMessage),
|
dialogService.showErrorMessage(String.format(messages["enter.tan.dialog.error.could.not.decode.tan.image"], error?.localizedMessage),
|
||||||
null, error, currentStage)
|
null, error, currentStage)
|
||||||
|
|
Loading…
Reference in New Issue