chore: improve logic for when to show subscription snackbar (#2195)

pull/1817/head
ggurdin 8 months ago committed by GitHub
parent c47c5cb2df
commit 1b80f12f6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -120,9 +120,11 @@ class SubscriptionController extends BaseController {
if (!kIsWeb) {
Purchases.addCustomerInfoUpdateListener(
(CustomerInfo info) async {
final bool wasSubscribed = isSubscribed != null && isSubscribed!;
final bool? wasSubscribed = isSubscribed;
await updateCustomerInfo();
if (!wasSubscribed && (isSubscribed != null && isSubscribed!)) {
if (wasSubscribed != null &&
!wasSubscribed &&
(isSubscribed != null && isSubscribed!)) {
subscriptionStream.add(true);
}
},

Loading…
Cancel
Save