Updated on 2026-08-14
This commit is contained in:
parent
f6e285825d
commit
ff01349bc8
2 changed files with 3 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ class CurrencyIconRequest(
|
|||
private val currencyTextView: TextView?,
|
||||
private val token: Token?,
|
||||
private val blockchain: Blockchain,
|
||||
private val getLocalImage: Boolean = false,
|
||||
) {
|
||||
fun load() {
|
||||
when {
|
||||
|
|
@ -84,7 +85,7 @@ class CurrencyIconRequest(
|
|||
crossinline onError: (Blockchain) -> Unit = {},
|
||||
) {
|
||||
currencyImageView.loadIcon(
|
||||
data = getIconUrl(blockchain.toNetworkId()),
|
||||
data = if (getLocalImage) blockchain.getRoundIconRes() else getIconUrl(blockchain.toNetworkId()),
|
||||
placeholderRes = blockchain.getRoundIconRes(),
|
||||
onStart = { onStart(blockchain) },
|
||||
onSuccess = { onSuccess(blockchain) },
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ fun CurrencyIconView.load(
|
|||
currencyTextView = null,
|
||||
token = null,
|
||||
blockchain = currency.blockchain,
|
||||
getLocalImage = true,
|
||||
).load()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue