From 94dd1aaff83b36b1a2744cd74727b5f9a23ca8f7 Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 23 Sep 2020 04:14:47 +0200 Subject: [PATCH] Fixed that for credit card accounts retrieving balance may not be supported, but balance may gets retrieved in another way (like with transactions), then doAccountsSupportRetrievingBalance() now returns true anyway --- .../kotlin/net/dankito/banking/ui/presenter/BankingPresenter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/presenter/BankingPresenter.kt b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/presenter/BankingPresenter.kt index afed837a..55a5e304 100644 --- a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/presenter/BankingPresenter.kt +++ b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/presenter/BankingPresenter.kt @@ -724,7 +724,7 @@ open class BankingPresenter( get() = doAccountsSupportRetrievingBalance(selectedAccounts) open fun doAccountsSupportRetrievingBalance(accounts: List): Boolean { - return accounts.firstOrNull { it.supportsRetrievingBalance } != null + return accounts.firstOrNull { it.supportsRetrievingBalance || it.balance != BigDecimal.Zero } != null // for credit card account supportsRetrievingBalance may is false but for these balance may gets retrieved otherwise }