chore: improve logic for when to show subscription snackbar (#2195)
This commit is contained in:
parent
c47c5cb2df
commit
1b80f12f6f
1 changed files with 4 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue