Skip to content

Commit

Permalink
Improve display
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipthelen committed May 23, 2024
1 parent 04d73f2 commit 071fb95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ private fun AvatarEquipmentView(
}
.background(colorResource(id = R.color.window_background)),
) {
if (item.key.isNullOrBlank() || item.key == "0" || item.key?.endsWith("_0") == true) {
if (item.key.isNullOrBlank() || item.key == "0" || item.key?.endsWith("_0") == true || item.key == "none") {
Image(painterResource(R.drawable.empty_slot), contentDescription = null, contentScale = ContentScale.None, modifier = Modifier.size(68.dp))
} else {
PixelArtView(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,13 @@ class ShopItemViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), Vi
val isLimited = item.isLimited || item.availableUntil != null
if (numberOwned > 0) {
binding.itemDetailIndicator.text = numberOwned.toString()
binding.itemDetailIndicator.background =
AppCompatResources.getDrawable(context, R.drawable.pill_bg_gray)
if (isLimited) {
binding.itemDetailIndicator.background = AppCompatResources.getDrawable(context, R.drawable.pill_bg_purple_300)
binding.itemDetailIndicator.setTextColor(ContextCompat.getColor(context, R.color.white))
} else {
binding.itemDetailIndicator.background = AppCompatResources.getDrawable(context, R.drawable.pill_bg_gray)
binding.itemDetailIndicator.setTextColor(ContextCompat.getColor(context, R.color.text_quad))
}
binding.itemDetailIndicator.visibility = View.VISIBLE
} else if (item.locked) {
binding.itemDetailIndicator.background =
Expand Down

0 comments on commit 071fb95

Please sign in to comment.