Fixed that if a TAN needs to be entered AddAccountDialog doesn't get dismissed

This commit is contained in:
dankito 2020-07-24 19:16:04 +02:00
parent 20a396c33b
commit d3fa90d529
1 changed files with 3 additions and 1 deletions

View File

@ -77,7 +77,9 @@ struct AddAccountDialog: View {
func handleAddAccountResponse(_ response: AddAccountResponse) {
if (response.isSuccessful) {
presentation.wrappedValue.dismiss()
DispatchQueue.main.async { // dispatch async as may EnterTanDialog is still displayed so dismiss() won't dismiss this view
self.presentation.wrappedValue.dismiss()
}
}
else {
self.errorMessage = Message(title: Text("Could not add account"), message: Text("Error message from your bank \(response.errorToShowToUser ?? "")"))