mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-08 21:37:53 +00:00
Fix showing locked shop items
This commit is contained in:
parent
826873e4b8
commit
275b5bb46f
1 changed files with 5 additions and 1 deletions
|
|
@ -68,7 +68,7 @@ class ShopItemViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), Vi
|
|||
itemDetailIndicator.visibility = View.GONE
|
||||
|
||||
val lockedReason = item.shortLockedReason(context)
|
||||
if (!item.locked) {
|
||||
if (!item.locked || lockedReason == null) {
|
||||
priceLabel.text = item.value.toString()
|
||||
priceLabel.currency = item.currency
|
||||
if (item.currency == null) {
|
||||
|
|
@ -76,6 +76,10 @@ class ShopItemViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), Vi
|
|||
}
|
||||
priceLabel.visibility = View.VISIBLE
|
||||
unlockLabel.visibility = View.GONE
|
||||
if (item.locked) {
|
||||
itemDetailIndicator.background = lockedDrawable
|
||||
itemDetailIndicator.visibility = View.VISIBLE
|
||||
}
|
||||
} else {
|
||||
unlockLabel.text = lockedReason
|
||||
priceLabel.visibility = View.GONE
|
||||
|
|
|
|||
Loading…
Reference in a new issue