mirror of https://github.com/M66B/FairEmail.git
Fixed IAB flow
This commit is contained in:
parent
a54ca0247b
commit
75be113b33
|
@ -312,7 +312,7 @@ abstract class ActivityBilling extends ActivityBase implements PurchasesUpdatedL
|
||||||
//}
|
//}
|
||||||
|
|
||||||
for (IBillingListener listener : listeners)
|
for (IBillingListener listener : listeners)
|
||||||
if (purchased)
|
if (purchased && purchase.isAcknowledged())
|
||||||
listener.onPurchased(purchase.getSku());
|
listener.onPurchased(purchase.getSku());
|
||||||
else
|
else
|
||||||
listener.onPurchasePending(purchase.getSku());
|
listener.onPurchasePending(purchase.getSku());
|
||||||
|
@ -402,6 +402,9 @@ abstract class ActivityBilling extends ActivityBase implements PurchasesUpdatedL
|
||||||
if (result.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
if (result.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ActivityBilling.this);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ActivityBilling.this);
|
||||||
prefs.edit().putBoolean("pro", true).apply();
|
prefs.edit().putBoolean("pro", true).apply();
|
||||||
|
|
||||||
|
for (IBillingListener listener : listeners)
|
||||||
|
listener.onPurchased(purchase.getSku());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue