diff --git a/app/lib/pages/home/page.dart b/app/lib/pages/home/page.dart index ced780a1c..aaf917cac 100644 --- a/app/lib/pages/home/page.dart +++ b/app/lib/pages/home/page.dart @@ -49,7 +49,7 @@ class _HomePageWrapperState extends State { AnalyticsManager().setUserAttribute('Notifications Enabled', SharedPreferencesUtil().notificationsEnabled); } if (SharedPreferencesUtil().notificationsEnabled) { - await NotificationService.instance.register(); + NotificationService.instance.register(); } if (SharedPreferencesUtil().locationEnabled != await Permission.location.isGranted) { SharedPreferencesUtil().locationEnabled = await Permission.location.isGranted; diff --git a/app/lib/services/notifications.dart b/app/lib/services/notifications.dart index 7b46fc921..fde4859a0 100644 --- a/app/lib/services/notifications.dart +++ b/app/lib/services/notifications.dart @@ -102,6 +102,8 @@ class NotificationService { return isAllowed; } + // Whereever this method is awaited, it will cause the app to not move forwared in execution due to it being a method call. + // This was also the culprit when we had the app freeze on splash screen. Future register() async { try { await platform.invokeMethod(