From 73fcc75eab80b81193b4deaaca0b0a04ee3b2ed7 Mon Sep 17 00:00:00 2001 From: Phillip Thelen Date: Tue, 21 Jun 2022 23:34:20 +0200 Subject: [PATCH] fix iap issue # Conflicts: # Habitica/build.gradle --- .../com/habitrpg/android/habitica/helpers/PurchaseHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/helpers/PurchaseHandler.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/helpers/PurchaseHandler.kt index e1a080cf6..ba9d71278 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/helpers/PurchaseHandler.kt +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/helpers/PurchaseHandler.kt @@ -73,7 +73,7 @@ class PurchaseHandler( val mostRecentSub = findMostRecentSubscription(purchases) val plan = userViewModel.user.value?.purchased?.plan for (purchase in purchases) { - if (plan?.isActive == true) { + if (plan?.isActive == true && PurchaseTypes.allSubscriptionTypes.contains(purchase.skus.firstOrNull())) { if ((plan.additionalData?.data?.orderId == purchase.orderId && ((plan.dateTerminated != null) == purchase.isAutoRenewing)) || mostRecentSub?.orderId != purchase.orderId