From e7da52098a6714b5947843e20da0273642a62df4 Mon Sep 17 00:00:00 2001 From: max-klaus Date: Wed, 14 Apr 2021 21:09:41 +0300 Subject: [PATCH] Fix resubscribe --- .../net/osmand/plus/inapp/InAppPurchaseHelperImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java index f1a07a1d3d..32597863d1 100644 --- a/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java +++ b/OsmAnd/src-google/net/osmand/plus/inapp/InAppPurchaseHelperImpl.java @@ -175,7 +175,8 @@ public class InAppPurchaseHelperImpl extends InAppPurchaseHelper { }); } for (Purchase purchase : purchases) { - if (!purchase.isAcknowledged()) { + InAppSubscription subscription = getLiveUpdates().getSubscriptionBySku(purchase.getSku()); + if (!purchase.isAcknowledged() || (subscription != null && !subscription.isPurchased())) { onPurchaseFinished(purchase); } }