mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 18:38:36 +08:00
SubscriptionStatus: Avoid rechecking on start
Just check once and cache the value.
This commit is contained in:
@ -14,6 +14,10 @@ class InAppPurchases {
|
|||||||
Log.i("Not checking PurchaseInfo as exp = $exp and cur = $currentDt");
|
Log.i("Not checking PurchaseInfo as exp = $exp and cur = $currentDt");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (exp == "-") {
|
||||||
|
Log.d("Ignoring IAP pro check - already checked");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (JournalApp.isInDebugMode) {
|
if (JournalApp.isInDebugMode) {
|
||||||
Log.d("Ignoring IAP pro check - debug mode");
|
Log.d("Ignoring IAP pro check - debug mode");
|
||||||
@ -29,7 +33,8 @@ class InAppPurchases {
|
|||||||
Settings.instance.proMode = isPro;
|
Settings.instance.proMode = isPro;
|
||||||
Settings.instance.save();
|
Settings.instance.save();
|
||||||
} else {
|
} else {
|
||||||
Settings.instance.proExpirationDate = sub.expiryDate.toIso8601String();
|
Settings.instance.proExpirationDate =
|
||||||
|
sub != null ? sub.expiryDate.toIso8601String() : "-";
|
||||||
Settings.instance.save();
|
Settings.instance.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user