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()) {
updateAccountsTransactionsAsync(accountsToUpdate, true, callback)
}
else if (allAccounts.isNotEmpty()) {
} else { // so that UI can reset its state
callback?.invoke(null)
}
}
@ -407,8 +406,7 @@ open class BankingPresenter(
if (accountsToUpdate.isNotEmpty()) {
updateAccountsTransactionsAsync(accountsToUpdate, false, done)
}
else if (allAccounts.isNotEmpty()) {
} else { // so that UI can reset its state
done?.invoke(null)
}
}