Updated on 2026-08-14
This commit is contained in:
parent
f6e8d7fd73
commit
d13df4aedc
3 changed files with 28 additions and 13 deletions
|
|
@ -629,6 +629,13 @@
|
|||
"name" : "QASH",
|
||||
"contractAddress" : "0x618e75ac90b12c6049ba3b27f5d5f8651b0037f6"
|
||||
},
|
||||
{
|
||||
"decimalCount" : 8,
|
||||
"symbol" : "QCX",
|
||||
"name" : "QuickX Protocol",
|
||||
"contractAddress" : "0xf9e5af7b42d31d51677c75bbbd37c1986ec79aee",
|
||||
"customIcon": "qcx"
|
||||
},
|
||||
{
|
||||
"decimalCount" : 8,
|
||||
"symbol" : "QRL",
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
BIN
app/src/main/res/drawable-ldpi/ic_qcx.png
Normal file
BIN
app/src/main/res/drawable-ldpi/ic_qcx.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
Loading…
Add table
Add a link
Reference in a new issue