From 8913b42803b65f49c74f723a6ee43036095c6341 Mon Sep 17 00:00:00 2001 From: Krille Date: Wed, 12 Apr 2023 09:18:20 +0200 Subject: [PATCH] fix: Set fcm priority to max on android --- lib/utils/push_helper.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/utils/push_helper.dart b/lib/utils/push_helper.dart index 80b4132d..5e8545bf 100644 --- a/lib/utils/push_helper.dart +++ b/lib/utils/push_helper.dart @@ -179,15 +179,15 @@ Future _tryPushHelper( final id = await mapRoomIdToInt(event.room.id); // Show notification + final person = Person( + name: event.senderFromMemoryOrFallback.calcDisplayname(), + icon: + avatarFile == null ? null : BitmapFilePathAndroidIcon(avatarFile.path), + ); final newMessage = Message( body, event.originServerTs, - Person( - name: event.senderFromMemoryOrFallback.calcDisplayname(), - icon: avatarFile == null - ? null - : BitmapFilePathAndroidIcon(avatarFile.path), - ), + person, ); final messagingStyleInformation = PlatformInfos.isAndroid @@ -203,7 +203,7 @@ Future _tryPushHelper( number: notification.counts?.unread, styleInformation: messagingStyleInformation ?? MessagingStyleInformation( - Person(name: event.room.client.userID), + person, conversationTitle: event.room.getLocalizedDisplayname( MatrixLocals(l10n), ), @@ -212,7 +212,7 @@ Future _tryPushHelper( ), ticker: l10n.unreadChats(notification.counts?.unread ?? 1), importance: Importance.max, - priority: Priority.high, + priority: Priority.max, groupKey: event.room.id, ); const iOSPlatformChannelSpecifics = DarwinNotificationDetails();