From 395ef5445c57610b8e1ecc15c7c9f33451184212 Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 23 Sep 2020 03:42:11 +0200 Subject: [PATCH] Fixed that as now retrievedData contains an entry for each account only if account supports retrieving transactions retrieval must be successful --- .../banking/fints/response/client/GetTransactionsResponse.kt | 4 +++- .../banking/ui/model/responses/GetTransactionsResponse.kt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/client/GetTransactionsResponse.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/client/GetTransactionsResponse.kt index 122258b0..377a00bd 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/client/GetTransactionsResponse.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/client/GetTransactionsResponse.kt @@ -14,6 +14,8 @@ open class GetTransactionsResponse( ) : FinTsClientResponse(response) { override val successful: Boolean - get() = super.successful && retrievedData.isNotEmpty() && retrievedData.none { it.successfullyRetrievedData == false } + get() = super.successful + && retrievedData.isNotEmpty() + && retrievedData.none { it.account.supportsRetrievingAccountTransactions && it.successfullyRetrievedData == false } } \ No newline at end of file diff --git a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/responses/GetTransactionsResponse.kt b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/responses/GetTransactionsResponse.kt index 4105ab4b..e65fde7a 100644 --- a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/responses/GetTransactionsResponse.kt +++ b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/responses/GetTransactionsResponse.kt @@ -19,6 +19,8 @@ open class GetTransactionsResponse( override val successful: Boolean - get() = errorToShowToUser == null && retrievedData.isNotEmpty() && retrievedData.none { it.successfullyRetrievedData == false } + get() = errorToShowToUser == null + && retrievedData.isNotEmpty() + && retrievedData.none { it.account.supportsRetrievingAccountTransactions && it.successfullyRetrievedData == false } }