From 27bcb09edf0acfde2819732771d9b624f01273d4 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Thu, 9 Jul 2020 17:11:48 +0200 Subject: [PATCH] IAP: Log the expiry date --- lib/iap.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/iap.dart b/lib/iap.dart index cbd642a6..8d0c74c2 100644 --- a/lib/iap.dart +++ b/lib/iap.dart @@ -8,10 +8,11 @@ import 'package:gitjournal/settings.dart'; class InAppPurchases { static Future confirmProPurchase() async { - Log.i("Checking if ProMode should be enabled"); - var currentDt = DateTime.now().toUtc().toIso8601String(); var exp = Settings.instance.proExpirationDate; + + Log.i("Checking if ProMode should be enabled. Exp: $exp"); + if (exp != null && exp.isNotEmpty && exp.compareTo(currentDt) > 0) { Log.i("Not checking PurchaseInfo as exp = $exp and cur = $currentDt"); return;