Fixed that banks parameter may contained only one bank

This commit is contained in:
dankito 2020-09-14 23:02:17 +02:00
parent 20969ff14f
commit 79b61dcb52
1 changed files with 3 additions and 3 deletions

View File

@ -15,15 +15,15 @@ class AppData : ObservableObject {
init() { init() {
setFieldsForBanks(presenter.customers) setFieldsForBanks()
presenter.addAccountsChangedListener { banks in presenter.addAccountsChangedListener { banks in
self.setFieldsForBanks(banks) self.setFieldsForBanks()
} }
} }
private func setFieldsForBanks(_ banks: [ICustomer]) { private func setFieldsForBanks() {
self.banks = presenter.customers self.banks = presenter.customers
self.banksSorted = banks.sortedByDisplayIndex() self.banksSorted = banks.sortedByDisplayIndex()