Fixed that application crashes if we're in editing mode and last bank gets deleted
This commit is contained in:
parent
f447b17aa6
commit
047f0e075f
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue