chore: Adjust ticker of notifications for Android
This commit is contained in:
parent
6e13c17682
commit
0436c5c517
2 changed files with 21 additions and 3 deletions
|
|
@ -2485,5 +2485,13 @@
|
||||||
"stickers": "Stickers",
|
"stickers": "Stickers",
|
||||||
"discover": "Discover",
|
"discover": "Discover",
|
||||||
"commandHint_ignore": "Ignore the given matrix ID",
|
"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": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -58,7 +58,10 @@ Future<void> pushHelper(
|
||||||
AppConfig.pushNotificationsChannelId,
|
AppConfig.pushNotificationsChannelId,
|
||||||
l10n.incomingMessages,
|
l10n.incomingMessages,
|
||||||
number: notification.counts?.unread,
|
number: notification.counts?.unread,
|
||||||
ticker: l10n.unreadChats(notification.counts?.unread ?? 1),
|
ticker: l10n.unreadChatsInApp(
|
||||||
|
AppConfig.applicationName,
|
||||||
|
(notification.counts?.unread ?? 0).toString(),
|
||||||
|
),
|
||||||
importance: Importance.high,
|
importance: Importance.high,
|
||||||
priority: Priority.max,
|
priority: Priority.max,
|
||||||
shortcutId: notification.roomId,
|
shortcutId: notification.roomId,
|
||||||
|
|
@ -277,7 +280,14 @@ Future<void> _tryPushHelper(
|
||||||
groupConversation: !event.room.isDirectChat,
|
groupConversation: !event.room.isDirectChat,
|
||||||
messages: [newMessage],
|
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,
|
importance: Importance.high,
|
||||||
priority: Priority.max,
|
priority: Priority.max,
|
||||||
groupKey: notificationGroupId,
|
groupKey: notificationGroupId,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue