diff --git a/assets/l10n/intl_en.arb b/assets/l10n/intl_en.arb index 9424b01ae..09678730b 100644 --- a/assets/l10n/intl_en.arb +++ b/assets/l10n/intl_en.arb @@ -2485,5 +2485,13 @@ "stickers": "Stickers", "discover": "Discover", "commandHint_ignore": "Ignore the given matrix ID", - "commandHint_unignore": "Unignore the given matrix ID" + "commandHint_unignore": "Unignore the given matrix ID", + "unreadChatsInApp": "{appname}: {unread} unread chats", + "@unreadChatsInApp": { + "type": "text", + "placeholders": { + "appname": {}, + "unread": {} + } + } } \ No newline at end of file diff --git a/lib/utils/push_helper.dart b/lib/utils/push_helper.dart index d30c1ba76..edfdb4941 100644 --- a/lib/utils/push_helper.dart +++ b/lib/utils/push_helper.dart @@ -58,7 +58,10 @@ Future pushHelper( AppConfig.pushNotificationsChannelId, l10n.incomingMessages, number: notification.counts?.unread, - ticker: l10n.unreadChats(notification.counts?.unread ?? 1), + ticker: l10n.unreadChatsInApp( + AppConfig.applicationName, + (notification.counts?.unread ?? 0).toString(), + ), importance: Importance.high, priority: Priority.max, shortcutId: notification.roomId, @@ -277,7 +280,14 @@ Future _tryPushHelper( groupConversation: !event.room.isDirectChat, messages: [newMessage], ), - ticker: l10n.unreadChats(notification.counts?.unread ?? 1), + ticker: event.calcLocalizedBodyFallback( + matrixLocals, + plaintextBody: true, + withSenderNamePrefix: true, + hideReply: true, + hideEdit: true, + removeMarkdown: true, + ), importance: Importance.high, priority: Priority.max, groupKey: notificationGroupId,