fixed filters subscription purchase dialog

This commit is contained in:
Mariotaku Lee 2017-01-20 22:31:29 +08:00
parent 289d9fe904
commit f74b09954d
No known key found for this signature in database
GPG Key ID: 9C0706AE47FCE2AD
1 changed files with 6 additions and 4 deletions

View File

@ -71,7 +71,7 @@ class FiltersSubscriptionsFragment : BaseFragment(), LoaderManager.LoaderCallbac
if (savedInstanceState == null) { if (savedInstanceState == null) {
when (arguments?.getString(EXTRA_ACTION)) { when (arguments?.getString(EXTRA_ACTION)) {
ACTION_ADD_URL_SUBSCRIPTION -> { ACTION_ADD_URL_SUBSCRIPTION -> {
if (extraFeaturesService.isEnabled(ExtraFeaturesService.FEATURE_FILTERS_SUBSCRIPTION).not()) { if (!extraFeaturesService.isEnabled(ExtraFeaturesService.FEATURE_FILTERS_SUBSCRIPTION)) {
val df = ExtraFeaturesIntroductionDialogFragment.show(childFragmentManager, val df = ExtraFeaturesIntroductionDialogFragment.show(childFragmentManager,
ExtraFeaturesService.FEATURE_FILTERS_SUBSCRIPTION) ExtraFeaturesService.FEATURE_FILTERS_SUBSCRIPTION)
df.setTargetFragment(this, REQUEST_ADD_URL_SUBSCRIPTION_PURCHASE) df.setTargetFragment(this, REQUEST_ADD_URL_SUBSCRIPTION_PURCHASE)
@ -80,6 +80,7 @@ class FiltersSubscriptionsFragment : BaseFragment(), LoaderManager.LoaderCallbac
} }
} }
else -> { else -> {
if (!extraFeaturesService.isEnabled(ExtraFeaturesService.FEATURE_FILTERS_SUBSCRIPTION)) {
val df = ExtraFeaturesIntroductionDialogFragment.show(childFragmentManager, val df = ExtraFeaturesIntroductionDialogFragment.show(childFragmentManager,
ExtraFeaturesService.FEATURE_FILTERS_SUBSCRIPTION) ExtraFeaturesService.FEATURE_FILTERS_SUBSCRIPTION)
df.setTargetFragment(this, REQUEST_PURCHASE_EXTRA_FEATURES) df.setTargetFragment(this, REQUEST_PURCHASE_EXTRA_FEATURES)
@ -87,6 +88,7 @@ class FiltersSubscriptionsFragment : BaseFragment(), LoaderManager.LoaderCallbac
} }
} }
} }
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
when (requestCode) { when (requestCode) {