mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-01 04:07:53 +08:00
IAP: Convert print to Log
This commit is contained in:
@ -10,7 +10,7 @@ class InAppPurchases {
|
|||||||
var currentDt = DateTime.now().toUtc().toIso8601String();
|
var currentDt = DateTime.now().toUtc().toIso8601String();
|
||||||
var exp = Settings.instance.proExpirationDate;
|
var exp = Settings.instance.proExpirationDate;
|
||||||
if (exp != null && exp.isNotEmpty && exp.compareTo(currentDt) > 0) {
|
if (exp != null && exp.isNotEmpty && exp.compareTo(currentDt) > 0) {
|
||||||
print("Not checking PurchaseInfo as exp = $exp and cur = $currentDt");
|
Log.i("Not checking PurchaseInfo as exp = $exp and cur = $currentDt");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -18,16 +18,15 @@ class InAppPurchases {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Purchases.setDebugLogsEnabled(false);
|
|
||||||
await Purchases.setup(
|
await Purchases.setup(
|
||||||
environment['revenueCat'],
|
environment['revenueCat'],
|
||||||
appUserId: Settings.instance.pseudoId,
|
appUserId: Settings.instance.pseudoId,
|
||||||
);
|
);
|
||||||
|
|
||||||
PurchaserInfo purchaserInfo = await Purchases.getPurchaserInfo();
|
PurchaserInfo purchaserInfo = await Purchases.getPurchaserInfo();
|
||||||
print("Got PurchaserInfo $purchaserInfo");
|
Log.i("Got PurchaserInfo $purchaserInfo");
|
||||||
var isPro = purchaserInfo.entitlements.active.containsKey("pro");
|
var isPro = purchaserInfo.entitlements.active.containsKey("pro");
|
||||||
print("IsPro $isPro");
|
Log.i("IsPro $isPro");
|
||||||
|
|
||||||
if (Settings.instance.proMode != isPro) {
|
if (Settings.instance.proMode != isPro) {
|
||||||
Log.i("Pro mode changed to $isPro");
|
Log.i("Pro mode changed to $isPro");
|
||||||
|
Reference in New Issue
Block a user