From f3c1007b5e7a1d29161f71982e1c69a6db9852f3 Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 22 Sep 2020 04:02:52 +0200 Subject: [PATCH] Also checking on app start-up if now no more transactions can be retrieved from bank server --- .../net/dankito/banking/ui/presenter/BankingPresenter.kt | 6 ++++++ 1 file changed, 6 insertions(+) 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 a1668772..54fcd3e9 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 @@ -124,6 +124,12 @@ open class BankingPresenter( val newClient = bankingClientCreator.createClient(customer, dataFolder, asyncRunner, callback) addClientForAccount(customer, newClient) + + customer.accounts.forEach { account -> + if (account.haveAllTransactionsBeenFetched == false && didFetchAllTransactionsStoredOnBankServer(account, listOf())) { + account.haveAllTransactionsBeenFetched = true // no need to save account, just delays app start-up, as even if account doesn't get saved during app run, haveAllTransactionsBeenFetched gets restored on next app run + } + } } callAccountsChangedListeners()