Implemented when user explicitly presses 'Update transactions' button, then account.includeInAutomaticAccountsUpdate is ignored. But may still check for bank.wrongCredentialsEntered ?

This commit is contained in:
dankito 2021-11-06 14:30:04 +01:00
parent 8687320ef3
commit 4f8ce829cd
1 changed files with 2 additions and 5 deletions

View File

@ -398,11 +398,8 @@ open class BankingPresenter(
} }
open fun updateSelectedAccountsTransactionsAsync(done: ((GetTransactionsResponse?) -> Unit)? = null) { open fun updateSelectedAccountsTransactionsAsync(done: ((GetTransactionsResponse?) -> Unit)? = null) {
var accountsToUpdate = selectedAccounts.filter { considerAccountInAutomaticUpdates(it) } // user explicitly pressed update transactions, so ignore includeInAutomaticAccountsUpdate; hidden accounts are already removed in selectedAccounts
if (accountsToUpdate.isEmpty() && (selectedAccountType == SelectedAccountType.SingleAccount val accountsToUpdate = selectedAccounts // TODO: may remove accounts with wrongCredentialsEntered
|| (selectedAccountType == SelectedAccountType.SingleBank && selectedAccounts.size == 1))) {
accountsToUpdate = selectedAccounts
}
if (accountsToUpdate.isNotEmpty()) { if (accountsToUpdate.isNotEmpty()) {
updateAccountsTransactionsAsync(accountsToUpdate, false, done) updateAccountsTransactionsAsync(accountsToUpdate, false, done)