Fixed that if bookedTransactions have been retrieved even though if account says it doesn't support retrieving transactions, state RetrievedTransactions is returned anyway so that transactions get displayed
This commit is contained in:
parent
518f8c848a
commit
5d0f74c5e7
|
@ -949,14 +949,16 @@ open class BankingPresenter(
|
|||
return TransactionsRetrievalState.AccountTypeNotSupported
|
||||
}
|
||||
|
||||
if (account.supportsRetrievingAccountTransactions == false) {
|
||||
return TransactionsRetrievalState.AccountDoesNotSupportFetchingTransactions
|
||||
}
|
||||
|
||||
// check first if transactions already have been received and then if retrieving transactions is supported as it already occurred that
|
||||
// transactions have been retrieved but account.supportsRetrievingAccountTransactions was set to false (may retrieving transactions is now not supported anymore)
|
||||
if (account.bookedTransactions.isNotEmpty()) {
|
||||
return TransactionsRetrievalState.RetrievedTransactions
|
||||
}
|
||||
|
||||
if (account.supportsRetrievingAccountTransactions == false) {
|
||||
return TransactionsRetrievalState.AccountDoesNotSupportFetchingTransactions
|
||||
}
|
||||
|
||||
if (account.retrievedTransactionsUpTo != null) {
|
||||
return TransactionsRetrievalState.NoTransactionsInRetrievedPeriod
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue