Merge pull request #1954 from Hafizzle/Fiz/all-gear-owned-armoire-UI

Update state / message shown when you have all armoire items
This commit is contained in:
Phillip Thelen 2023-05-02 12:59:36 +02:00 committed by GitHub
commit c9726049d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View file

@ -34,6 +34,7 @@
android:layout_height="68dp" />
</LinearLayout>
<FrameLayout
android:id="@+id/footer_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/offset_background_30"

View file

@ -1382,6 +1382,7 @@
<string name="change_class_to_x">Change class to %s</string>
<string name="shop_armoire_title">You own all %s gear</string>
<string name="shop_armoire_description">New gear is released during the seasonal Galas. Until then, theres %d pieces of gear in the Enchanted Armoire to find!</string>
<string name="shop_armoire_empty_description">New gear is released during the seasonal Galas. The Enchanted Armoire gets new stock every month too!</string>
<string name="unlock_gear_and_skills">Unlock %s gear and skills</string>
<plurals name="you_x_others">

View file

@ -298,7 +298,15 @@ class ShopRecyclerAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<Vi
fun bind(className: String, armoireCount: Int) {
binding.titleView.text = itemView.context.getString(R.string.shop_armoire_title, className)
binding.descriptionView.text = itemView.context.getString(R.string.shop_armoire_description, armoireCount)
if (armoireCount > 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
}
}
}
}