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:
dankito 2021-11-06 13:42:01 +01:00
parent c50295895b
commit 43450ebc4f
1 changed files with 2 additions and 4 deletions

View File

@ -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)
} }
} }