Fixed updating mnitmSearchTransactions and mnitmUpdateTransactions visibility state

This commit is contained in:
dankl 2020-01-25 20:25:01 +01:00 committed by dankito
parent 90ce8be25d
commit 19fcbf2823
1 changed files with 1 additions and 9 deletions

View File

@ -133,8 +133,6 @@ class HomeFragment : Fragment() {
}
private fun initLogicAfterUiInitialized() {
presenter.addAccountsChangedListener { handleAccountsChanged() }
presenter.addSelectedBankAccountsChangedListener { handleSelectedBankAccountsChanged() }
presenter.addRetrievedAccountTransactionsResponseListener { _, response ->
@ -145,18 +143,12 @@ class HomeFragment : Fragment() {
}
private fun handleAccountsChanged() {
private fun handleSelectedBankAccountsChanged() {
context?.asActivity()?.let { activity ->
activity.runOnUiThread {
mnitmSearchTransactions.isVisible = presenter.doSelectedBankAccountsSupportRetrievingAccountTransactions
mnitmUpdateTransactions.isVisible = presenter.doSelectedBankAccountsSupportRetrievingAccountTransactions
}
}
}
private fun handleSelectedBankAccountsChanged() {
context?.asActivity()?.let { activity ->
activity.runOnUiThread {
updateTransactionsToDisplayOnUiThread()
}
}