Fixed setting displayIndex only if adding account was successful
This commit is contained in:
parent
129b4f64fa
commit
63caf84894
|
@ -148,10 +148,10 @@ open class BankingPresenter(
|
||||||
val startDate = Date()
|
val startDate = Date()
|
||||||
|
|
||||||
newClient.addAccountAsync { response ->
|
newClient.addAccountAsync { response ->
|
||||||
val account = response.customer
|
|
||||||
account.displayIndex = customers.size
|
|
||||||
|
|
||||||
if (response.successful) {
|
if (response.successful) {
|
||||||
|
val account = response.customer
|
||||||
|
account.displayIndex = customers.size
|
||||||
|
|
||||||
addClientForAccount(account, newClient)
|
addClientForAccount(account, newClient)
|
||||||
|
|
||||||
selectedAccount(account)
|
selectedAccount(account)
|
||||||
|
|
Loading…
Reference in New Issue