Updated on 2026-08-14

This commit is contained in:
Tangem 2021-05-21 09:32:18 +03:00
parent 3b9bfe13d8
commit 87b2ec8eaf

View file

@ -28,9 +28,15 @@ fun Picasso.loadCurrenciesIcon(
textView.text = null
when {
token?.symbol == QCX -> {
this.load(R.drawable.ic_qcx)?.into(imageView)
}
url != null -> {
if (token != null) {
setTokenImage(imageView, textView, token)
}
this.load(url)
.placeholder(R.drawable.shape_circle)
.noPlaceholder()
?.into(imageView,
object : Callback {
override fun onError(e: Exception?) {
@ -38,12 +44,13 @@ fun Picasso.loadCurrenciesIcon(
}
override fun onSuccess() {
if (token != null) {
imageView.colorFilter = null
textView.text = null
}
}
})
}
token?.symbol == QCX -> {
this.load(R.drawable.ic_qcx)?.into(imageView)
}
else -> {
setOfflineCurrencyImage(imageView, textView, token, blockchain)
}