Fixed that application crashes if we're in editing mode and last bank gets deleted

This commit is contained in:
dankito 2020-09-05 02:51:10 +02:00
parent f447b17aa6
commit 047f0e075f
1 changed files with 4 additions and 1 deletions

View File

@ -64,7 +64,10 @@ struct SettingsDialog: View {
}
func deleteAccount(_ bankToDelete: Customer) {
presenter.deleteAccount(customer: bankToDelete)
// don't know why but when deleting last bank application crashes if we don't delete bank async
DispatchQueue.main.async {
self.presenter.deleteAccount(customer: bankToDelete)
}
}
}