mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-20 12:49:02 +00:00
Correctly sort seasonal shop
This commit is contained in:
parent
20c5dd83a3
commit
3d2fa60d98
2 changed files with 11 additions and 25 deletions
|
|
@ -162,13 +162,17 @@ open class ShopFragment : BaseMainFragment<FragmentRecyclerviewBinding>() {
|
|||
specialCategory.items.add(ShopItem.makeFortifyItem(context?.resources))
|
||||
shop1.categories.add(specialCategory)
|
||||
}
|
||||
if (shop1.identifier == Shop.TIME_TRAVELERS_SHOP) {
|
||||
formatTimeTravelersShop(shop1)
|
||||
} else if (shop1.identifier == Shop.SEASONAL_SHOP) {
|
||||
shop1.categories.reverse()
|
||||
shop1
|
||||
} else {
|
||||
shop1
|
||||
when (shop1.identifier) {
|
||||
Shop.TIME_TRAVELERS_SHOP -> {
|
||||
formatTimeTravelersShop(shop1)
|
||||
}
|
||||
Shop.SEASONAL_SHOP -> {
|
||||
shop1.categories.sortWith(compareBy<ShopCategory> { it.items.size != 1 }.thenByDescending { it.items.firstOrNull()?.event?.end })
|
||||
shop1
|
||||
}
|
||||
else -> {
|
||||
shop1
|
||||
}
|
||||
}
|
||||
}
|
||||
.subscribe({
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"version": 2,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.habitrpg.android.habitica",
|
||||
"variantName": "processStaffReleaseResources",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 2841,
|
||||
"versionName": "3.2.1",
|
||||
"outputFile": "Habitica-staff-release.apk"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in a new issue