Fixed that banks parameter may contained only one bank
This commit is contained in:
parent
20969ff14f
commit
79b61dcb52
|
@ -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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue