From d3fa90d529bab053b6c18d09fe5c9fee09c7c6dc Mon Sep 17 00:00:00 2001 From: dankito Date: Fri, 24 Jul 2020 19:16:04 +0200 Subject: [PATCH] Fixed that if a TAN needs to be entered AddAccountDialog doesn't get dismissed --- .../BankingiOSApp/ui/views/AddAccountDialog.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/AddAccountDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/AddAccountDialog.swift index 834ec197..dbbc217a 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/AddAccountDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/AddAccountDialog.swift @@ -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 ?? "")"))