Fix cannot show push notification on android

(cherry picked from commit 07f1b44da20eddb412f36d982f2e08e0ca6d7f71)
This commit is contained in:
dab246
2023-03-30 16:12:21 +07:00
committed by Dat Vu
parent a7b5ac6b5c
commit 0c9d7ec4d3
@@ -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,