Added notify server update on app startup

This commit is contained in:
2024-02-17 13:26:22 +01:00
parent 82586cb764
commit b18aa5a99e
2 changed files with 3 additions and 46 deletions

View File

@ -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));