From 9ace2fe07b344d9bc4b8cfff4e22199382188e5d Mon Sep 17 00:00:00 2001 From: Krille Date: Wed, 12 Apr 2023 09:32:18 +0200 Subject: [PATCH] chore: Follow up push android priority and channels --- lib/utils/push_helper.dart | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/utils/push_helper.dart b/lib/utils/push_helper.dart index 5e8545bf..b8cf75fb 100644 --- a/lib/utils/push_helper.dart +++ b/lib/utils/push_helper.dart @@ -58,7 +58,7 @@ Future pushHelper( number: notification.counts?.unread, ticker: l10n.unreadChats(notification.counts?.unread ?? 1), importance: Importance.max, - priority: Priority.high, + priority: Priority.max, ), ), ); @@ -196,17 +196,19 @@ Future _tryPushHelper( : null; messagingStyleInformation?.messages?.add(newMessage); + final roomName = event.room.getLocalizedDisplayname(MatrixLocals(l10n)); + final androidPlatformChannelSpecifics = AndroidNotificationDetails( - AppConfig.pushNotificationsChannelId, - AppConfig.pushNotificationsChannelName, - channelDescription: AppConfig.pushNotificationsChannelDescription, + event.room.id, + roomName, + channelDescription: + event.room.isDirectChat ? l10n.directChats : l10n.groups, number: notification.counts?.unread, + category: AndroidNotificationCategory.message, styleInformation: messagingStyleInformation ?? MessagingStyleInformation( person, - conversationTitle: event.room.getLocalizedDisplayname( - MatrixLocals(l10n), - ), + conversationTitle: roomName, groupConversation: !event.room.isDirectChat, messages: [newMessage], ),