Fixed that by default bank's icon url gets set and only if there's no icon for bank available default icon gets used (fixes bug that if bank item is selected default icon got displayed)
This commit is contained in:
parent
e7b448126b
commit
e9a409f04a
|
@ -148,14 +148,15 @@ open class DrawerView(
|
|||
.withSecondaryIcon(GoogleMaterial.Icon.gmd_delete)
|
||||
.withSecondaryIconColor(activity, R.color.primaryTextColor_Dark)
|
||||
.withOnSecondaryIconClickedListener { closeDrawerAndEditAccount(account) }
|
||||
.withIcon(activity, FontAwesome.Icon.faw_piggy_bank, R.color.primaryTextColor_Dark)
|
||||
.withIcon(account.bank.iconUrl ?: "")
|
||||
.withSelected(presenter.isSingleSelectedAccount(account))
|
||||
.withOnDrawerItemClickListener { _, _, _ -> itemClicked { presenter.selectedAccount(account) } }
|
||||
|
||||
account.bank.iconUrl?.let { bankIconUrl ->
|
||||
accountItem.withIcon(bankIconUrl)
|
||||
if (account.bank.iconUrl == null) {
|
||||
accountItem.withIcon(activity, FontAwesome.Icon.faw_piggy_bank, R.color.primaryTextColor_Dark)
|
||||
}
|
||||
|
||||
|
||||
return accountItem
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue