Explorar o código

Publish the SubscriptionPurchasedEvent if a user has subscribed

Vishnu Mohandas %!s(int64=4) %!d(string=hai) anos
pai
achega
9ca222300e
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      lib/ui/password_reentry_page.dart

+ 3 - 0
lib/ui/password_reentry_page.dart

@@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
 import 'package:flutter/widgets.dart';
 import 'package:flutter/widgets.dart';
 import 'package:logging/logging.dart';
 import 'package:logging/logging.dart';
 import 'package:photos/core/configuration.dart';
 import 'package:photos/core/configuration.dart';
+import 'package:photos/core/event_bus.dart';
+import 'package:photos/events/subscription_purchased_event.dart';
 import 'package:photos/services/billing_service.dart';
 import 'package:photos/services/billing_service.dart';
 import 'package:photos/ui/common_elements.dart';
 import 'package:photos/ui/common_elements.dart';
 import 'package:photos/ui/subscription_page.dart';
 import 'package:photos/ui/subscription_page.dart';
@@ -97,6 +99,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
                               ),
                               ),
                             );
                             );
                           } else {
                           } else {
+                            Bus.instance.fire(SubscriptionPurchasedEvent());
                             Navigator.of(context)
                             Navigator.of(context)
                                 .popUntil((route) => route.isFirst);
                                 .popUntil((route) => route.isFirst);
                           }
                           }