Added notify server update on app startup
This commit is contained in:
@ -76,9 +76,9 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
||||
|
||||
// User Notifications
|
||||
if(Provider.of<SettingsProvider>(context, listen: false).val().notificationSettings.enabled) {
|
||||
FirebaseMessaging.instance.onTokenRefresh.listen((event) {
|
||||
NotifyUpdater.registerToServer();
|
||||
});
|
||||
update() => NotifyUpdater.registerToServer();
|
||||
FirebaseMessaging.instance.onTokenRefresh.listen((event) => update());
|
||||
update();
|
||||
}
|
||||
|
||||
FirebaseMessaging.onMessage.listen((message) => NotificationController.onForegroundMessageHandler(message, context));
|
||||
|
Reference in New Issue
Block a user