mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-21 05:09:00 +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() }
|
||||
}
|
||||
"hourglasses" == shopItem.currency -> {
|
||||
val subscriptionBottomSheet = EventOutcomeSubscriptionBottomSheetFragment().apply {
|
||||
eventType = EventOutcomeSubscriptionBottomSheetFragment.EVENT_HOURGLASS_SHOP_OPENED
|
||||
if ((user?.hourglassCount?.toDouble() ?: 0.0) > 0.0) {
|
||||
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