Fixed that callback always gets called to that UI can reset its state (e.g. re-enable to Update Transactions Button)
This commit is contained in:
parent
c50295895b
commit
43450ebc4f
|
@ -392,8 +392,7 @@ open class BankingPresenter(
|
||||||
|
|
||||||
if (accountsToUpdate.isNotEmpty()) {
|
if (accountsToUpdate.isNotEmpty()) {
|
||||||
updateAccountsTransactionsAsync(accountsToUpdate, true, callback)
|
updateAccountsTransactionsAsync(accountsToUpdate, true, callback)
|
||||||
}
|
} else { // so that UI can reset its state
|
||||||
else if (allAccounts.isNotEmpty()) {
|
|
||||||
callback?.invoke(null)
|
callback?.invoke(null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -407,8 +406,7 @@ open class BankingPresenter(
|
||||||
|
|
||||||
if (accountsToUpdate.isNotEmpty()) {
|
if (accountsToUpdate.isNotEmpty()) {
|
||||||
updateAccountsTransactionsAsync(accountsToUpdate, false, done)
|
updateAccountsTransactionsAsync(accountsToUpdate, false, done)
|
||||||
}
|
} else { // so that UI can reset its state
|
||||||
else if (allAccounts.isNotEmpty()) {
|
|
||||||
done?.invoke(null)
|
done?.invoke(null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue