From 2fa66ecbf4dcbaa56def6e69adf8934b41916af7 Mon Sep 17 00:00:00 2001 From: Hafiz Date: Thu, 6 Apr 2023 14:09:32 -0400 Subject: [PATCH 1/3] Update state for when you have all armoire items --- Habitica/res/layout/shop_armoire_gear.xml | 1 + Habitica/res/values/strings.xml | 2 +- .../habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Habitica/res/layout/shop_armoire_gear.xml b/Habitica/res/layout/shop_armoire_gear.xml index 9e375e00b..d0f66b5a6 100644 --- a/Habitica/res/layout/shop_armoire_gear.xml +++ b/Habitica/res/layout/shop_armoire_gear.xml @@ -34,6 +34,7 @@ android:layout_height="68dp" /> This equipment is class-locked Change class to %s You own all %s gear - New gear is released during the seasonal Galas. Until then, theres %d pieces of gear in the Enchanted Armoire to find! + New gear is released during the seasonal Galas. The Enchanted Armoire gets new stock every month too! Unlock %s gear and skills diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt index ccfb8ce5d..be4d4952f 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt @@ -288,7 +288,9 @@ class ShopRecyclerAdapter : androidx.recyclerview.widget.RecyclerView.Adapter Date: Thu, 6 Apr 2023 14:10:52 -0400 Subject: [PATCH 2/3] fix --- .../habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt index be4d4952f..d36dcd2a1 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt @@ -289,7 +289,7 @@ class ShopRecyclerAdapter : androidx.recyclerview.widget.RecyclerView.Adapter Date: Mon, 1 May 2023 00:38:00 -0400 Subject: [PATCH 3/3] Re-add message that show's when you don't have all the items / Check armoire count --- Habitica/res/values/strings.xml | 3 ++- .../ui/adapter/inventory/ShopRecyclerAdapter.kt | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Habitica/res/values/strings.xml b/Habitica/res/values/strings.xml index c5d40aed1..6cba30562 100644 --- a/Habitica/res/values/strings.xml +++ b/Habitica/res/values/strings.xml @@ -1381,7 +1381,8 @@ This equipment is class-locked Change class to %s You own all %s gear - New gear is released during the seasonal Galas. The Enchanted Armoire gets new stock every month too! + New gear is released during the seasonal Galas. Until then, theres %d pieces of gear in the Enchanted Armoire to find! + New gear is released during the seasonal Galas. The Enchanted Armoire gets new stock every month too! Unlock %s gear and skills diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt index d36dcd2a1..ce6070acd 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/adapter/inventory/ShopRecyclerAdapter.kt @@ -288,9 +288,15 @@ class ShopRecyclerAdapter : androidx.recyclerview.widget.RecyclerView.Adapter 0) { + binding.descriptionView.text = itemView.context.getString(R.string.shop_armoire_description, armoireCount) + binding.footerLayout.visibility = View.VISIBLE + binding.iconView.visibility = View.VISIBLE + } else { + binding.descriptionView.text = itemView.context.getString(R.string.shop_armoire_empty_description) + binding.footerLayout.visibility = View.INVISIBLE + binding.iconView.visibility = View.GONE + } } } }