Fixed hiding lytTransactionsTopBar if no transactions have been retrieved yet

This commit is contained in:
dankito 2020-09-24 03:19:05 +02:00
parent 9854ac000e
commit 24dd07d46f
1 changed files with 1 additions and 0 deletions

View File

@ -262,6 +262,7 @@ class HomeFragment : Fragment() {
val haveTransactionsBeenRetrieved = transactionsRetrievalState == TransactionsRetrievalState.RetrievedTransactions val haveTransactionsBeenRetrieved = transactionsRetrievalState == TransactionsRetrievalState.RetrievedTransactions
val noAccountsAddedYet = presenter.allBanks.isEmpty() val noAccountsAddedYet = presenter.allBanks.isEmpty()
lytTransactionsTopBar.visibility = if (haveTransactionsBeenRetrieved) View.VISIBLE else View.GONE
rcyvwAccountTransactions.visibility = if (haveTransactionsBeenRetrieved) View.VISIBLE else View.GONE rcyvwAccountTransactions.visibility = if (haveTransactionsBeenRetrieved) View.VISIBLE else View.GONE
lytNoTransactionsFetched.visibility = if (haveTransactionsBeenRetrieved || noAccountsAddedYet) View.GONE else View.VISIBLE lytNoTransactionsFetched.visibility = if (haveTransactionsBeenRetrieved || noAccountsAddedYet) View.GONE else View.VISIBLE
btnRetrieveTransactions.visibility = if (TransactionsCannotBeRetrievedStates.contains(transactionsRetrievalState)) View.GONE else View.VISIBLE btnRetrieveTransactions.visibility = if (TransactionsCannotBeRetrievedStates.contains(transactionsRetrievalState)) View.GONE else View.VISIBLE