Fix cannot show push notification on android
(cherry picked from commit 07f1b44da20eddb412f36d982f2e08e0ca6d7f71)
This commit is contained in:
+2
-3
@@ -88,6 +88,8 @@ class LocalNotificationManager {
|
|||||||
final granted = await _isAndroidPermissionGranted();
|
final granted = await _isAndroidPermissionGranted();
|
||||||
if (!granted) {
|
if (!granted) {
|
||||||
_notificationsEnabled = await _requestPermissions();
|
_notificationsEnabled = await _requestPermissions();
|
||||||
|
} else {
|
||||||
|
_notificationsEnabled = granted;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_notificationsEnabled = await _requestPermissions();
|
_notificationsEnabled = await _requestPermissions();
|
||||||
@@ -131,9 +133,6 @@ class LocalNotificationManager {
|
|||||||
EmailAddress? emailAddress,
|
EmailAddress? emailAddress,
|
||||||
String? payload
|
String? payload
|
||||||
}) async {
|
}) async {
|
||||||
if (!_notificationsEnabled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final inboxStyleInformation = InboxStyleInformation(
|
final inboxStyleInformation = InboxStyleInformation(
|
||||||
[message?.addBlockTag('p', attribute: 'style="color:#6D7885;"') ?? ''],
|
[message?.addBlockTag('p', attribute: 'style="color:#6D7885;"') ?? ''],
|
||||||
htmlFormatLines: true,
|
htmlFormatLines: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user