Fixed that 'Could not retrieve transactions' message got displayed even though no account has been added (yet)
This commit is contained in:
parent
be42e3b330
commit
f811d25ffd
|
@ -257,9 +257,10 @@ class HomeFragment : Fragment() {
|
|||
private fun setRecyclerViewAndNoTransactionsFetchedView() {
|
||||
val transactionsRetrievalState = presenter.selectedBankAccountsTransactionRetrievalState
|
||||
val haveTransactionsBeenRetrieved = transactionsRetrievalState == TransactionsRetrievalState.RetrievedTransactions
|
||||
val noAccountsAddedYet = presenter.customers.isEmpty()
|
||||
|
||||
rcyvwAccountTransactions.visibility = if (haveTransactionsBeenRetrieved) View.VISIBLE else View.GONE
|
||||
lytNoTransactionsFetched.visibility = if (haveTransactionsBeenRetrieved) View.GONE else View.VISIBLE
|
||||
lytNoTransactionsFetched.visibility = if (haveTransactionsBeenRetrieved || noAccountsAddedYet) View.GONE else View.VISIBLE
|
||||
btnRetrieveTransactions.visibility = if (transactionsRetrievalState == TransactionsRetrievalState.AccountDoesNotSupportFetchingTransactions) View.GONE else View.VISIBLE
|
||||
|
||||
val transactionsRetrievalStateMessageId = when (transactionsRetrievalState) {
|
||||
|
|
Loading…
Reference in New Issue