mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-13 17:51:57 +00:00
hourglass check to show either insufficienthourglass or sub bottomsheet
This commit is contained in:
parent
85a3411665
commit
574b1da91e
1 changed files with 8 additions and 3 deletions
|
|
@ -372,10 +372,15 @@ class PurchaseDialog(
|
||||||
parentActivity?.let { activity -> InsufficientGemsDialog(activity, shopItem.value).show() }
|
parentActivity?.let { activity -> InsufficientGemsDialog(activity, shopItem.value).show() }
|
||||||
}
|
}
|
||||||
"hourglasses" == shopItem.currency -> {
|
"hourglasses" == shopItem.currency -> {
|
||||||
val subscriptionBottomSheet = EventOutcomeSubscriptionBottomSheetFragment().apply {
|
if ((user?.hourglassCount?.toDouble() ?: 0.0) > 0.0) {
|
||||||
eventType = EventOutcomeSubscriptionBottomSheetFragment.EVENT_HOURGLASS_SHOP_OPENED
|
InsufficientHourglassesDialog(context).show()
|
||||||
|
} else {
|
||||||
|
val subscriptionBottomSheet = EventOutcomeSubscriptionBottomSheetFragment().apply {
|
||||||
|
eventType = EventOutcomeSubscriptionBottomSheetFragment.EVENT_HOURGLASS_SHOP_OPENED
|
||||||
|
}
|
||||||
|
parentActivity?.let { activity -> subscriptionBottomSheet.show(activity.supportFragmentManager, SubscriptionBottomSheetFragment.TAG) }
|
||||||
}
|
}
|
||||||
parentActivity?.let { activity -> subscriptionBottomSheet.show(activity.supportFragmentManager, SubscriptionBottomSheetFragment.TAG) }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue