From 0c9d7ec4d35ac3ac87fe17254a8f9ddfecb2b19e Mon Sep 17 00:00:00 2001 From: dab246 Date: Thu, 30 Mar 2023 16:12:21 +0700 Subject: [PATCH] Fix cannot show push notification on android (cherry picked from commit 07f1b44da20eddb412f36d982f2e08e0ca6d7f71) --- .../notification/local_notification_manager.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/features/push_notification/presentation/notification/local_notification_manager.dart b/lib/features/push_notification/presentation/notification/local_notification_manager.dart index f236e1de7..1bdedaf7f 100644 --- a/lib/features/push_notification/presentation/notification/local_notification_manager.dart +++ b/lib/features/push_notification/presentation/notification/local_notification_manager.dart @@ -88,6 +88,8 @@ class LocalNotificationManager { final granted = await _isAndroidPermissionGranted(); if (!granted) { _notificationsEnabled = await _requestPermissions(); + } else { + _notificationsEnabled = granted; } } else { _notificationsEnabled = await _requestPermissions(); @@ -131,9 +133,6 @@ class LocalNotificationManager { EmailAddress? emailAddress, String? payload }) async { - if (!_notificationsEnabled) { - return; - } final inboxStyleInformation = InboxStyleInformation( [message?.addBlockTag('p', attribute: 'style="color:#6D7885;"') ?? ''], htmlFormatLines: true,