Fixed that TransferMoneyDialog has been closed before success alert dialog got closed

This commit is contained in:
dankito 2020-07-18 17:27:33 +02:00
parent 90a0ad5b4a
commit 97983ec92e
1 changed files with 3 additions and 2 deletions

View File

@ -144,8 +144,9 @@ struct TransferMoneyDialog: View {
func handleTransferMoneyResponse(_ data: BUCTransferMoneyData, _ response: BUCBankingClientResponse) {
if (response.isSuccessful) {
self.transferMoneyResponseMessage = Message(message: Text("Successfully transferred \(data.amount) \("") to \(data.creditorName)"))
presentation.wrappedValue.dismiss()
self.transferMoneyResponseMessage = Message(message: Text("Successfully transferred \(data.amount) \("") to \(data.creditorName)"), primaryButton: .ok {
self.presentation.wrappedValue.dismiss()
})
}
else {
self.transferMoneyResponseMessage = Message(message: Text("Could not transfer \(data.amount) \("") to \(data.creditorName). Error: \(response.errorToShowToUser ?? response.error?.message ?? "")."))