From ad3d74e6737e9f1a6b0a7d6c380ba781cdbd34ac Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Mon, 7 May 2018 22:04:16 +0300 Subject: [PATCH] Do not auto-dismiss choose plan dialog until purchase finshed --- .../net/osmand/plus/chooseplan/ChoosePlanDialogFragment.java | 2 +- .../plus/chooseplan/ChoosePlanFreeBannerDialogFragment.java | 2 +- .../plus/chooseplan/ChoosePlanSeaDepthMapsDialogFragment.java | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanDialogFragment.java b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanDialogFragment.java index b29271a193..92a59323cf 100644 --- a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanDialogFragment.java @@ -306,7 +306,6 @@ public abstract class ChoosePlanDialogFragment extends BaseOsmAndDialogFragment @Override public void onClick(View v) { subscript(); - dismiss(); } }); } @@ -448,6 +447,7 @@ public abstract class ChoosePlanDialogFragment extends BaseOsmAndDialogFragment @Override public void onItemPurchased(String sku, boolean active) { + dismiss(); } @Override diff --git a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanFreeBannerDialogFragment.java b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanFreeBannerDialogFragment.java index f3d8a6b25d..8c675ca41d 100644 --- a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanFreeBannerDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanFreeBannerDialogFragment.java @@ -107,9 +107,9 @@ public class ChoosePlanFreeBannerDialogFragment extends ChoosePlanDialogFragment app.logEvent(getActivity(), "in_app_purchase_redirect_from_banner"); } else { app.logEvent(getActivity(), "paid_version_redirect_from_banner"); + dismiss(); } OsmandInAppPurchaseActivity.purchaseFullVersion(activity); - dismiss(); } } }); diff --git a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanSeaDepthMapsDialogFragment.java b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanSeaDepthMapsDialogFragment.java index 8730ed8bd2..6f312bbee1 100644 --- a/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanSeaDepthMapsDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/chooseplan/ChoosePlanSeaDepthMapsDialogFragment.java @@ -93,7 +93,6 @@ public class ChoosePlanSeaDepthMapsDialogFragment extends ChoosePlanDialogFragme Activity activity = getActivity(); if (activity != null) { OsmandInAppPurchaseActivity.purchaseDepthContours(activity); - dismiss(); } } });