Updated on 2026-08-14
This commit is contained in:
commit
4ca7fdddf8
3 changed files with 28 additions and 13 deletions
|
|
@ -27,23 +27,31 @@ fun Picasso.loadCurrenciesIcon(
|
|||
imageView.colorFilter = null
|
||||
textView.text = null
|
||||
|
||||
if (url != null) {
|
||||
this.load(url)
|
||||
.placeholder(R.drawable.shape_circle)
|
||||
?.into(imageView,
|
||||
object : Callback {
|
||||
override fun onError(e: Exception?) {
|
||||
setOfflineCurrencyImage(imageView, textView, token, blockchain)
|
||||
}
|
||||
when {
|
||||
url != null -> {
|
||||
this.load(url)
|
||||
.placeholder(R.drawable.shape_circle)
|
||||
?.into(imageView,
|
||||
object : Callback {
|
||||
override fun onError(e: Exception?) {
|
||||
setOfflineCurrencyImage(imageView, textView, token, blockchain)
|
||||
}
|
||||
|
||||
override fun onSuccess() {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
setOfflineCurrencyImage(imageView, textView, token, blockchain)
|
||||
override fun onSuccess() {
|
||||
}
|
||||
})
|
||||
}
|
||||
token?.symbol == QCX -> {
|
||||
this.load(R.drawable.ic_qcx)?.into(imageView)
|
||||
}
|
||||
else -> {
|
||||
setOfflineCurrencyImage(imageView, textView, token, blockchain)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private const val QCX = "QCX"
|
||||
|
||||
private fun setOfflineCurrencyImage(
|
||||
imageView: ImageView,
|
||||
textView: TextView,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue