design: Nicer display notification short texts

This commit is contained in:
Christian Pauly 2022-10-05 15:50:39 +02:00
parent 6f36200e0b
commit 5a74319b19
2 changed files with 16 additions and 14 deletions

View file

@ -1458,7 +1458,7 @@
"type": "text", "type": "text",
"placeholders": {} "placeholders": {}
}, },
"newMessageInFluffyChat": "New message in FluffyChat", "newMessageInFluffyChat": "💬 New message in FluffyChat",
"@newMessageInFluffyChat": { "@newMessageInFluffyChat": {
"type": "text", "type": "text",
"placeholders": {} "placeholders": {}
@ -2068,35 +2068,35 @@
"type": "text", "type": "text",
"placeholders": {} "placeholders": {}
}, },
"sentAFile": "{username} sent a file", "sentAFile": "📁 {username} sent a file",
"@sentAFile": { "@sentAFile": {
"type": "text", "type": "text",
"placeholders": { "placeholders": {
"username": {} "username": {}
} }
}, },
"sentAnAudio": "{username} sent an audio", "sentAnAudio": "🎤 {username} sent an audio",
"@sentAnAudio": { "@sentAnAudio": {
"type": "text", "type": "text",
"placeholders": { "placeholders": {
"username": {} "username": {}
} }
}, },
"sentAPicture": "{username} sent a picture", "sentAPicture": "🖼️ {username} sent a picture",
"@sentAPicture": { "@sentAPicture": {
"type": "text", "type": "text",
"placeholders": { "placeholders": {
"username": {} "username": {}
} }
}, },
"sentASticker": "{username} sent a sticker", "sentASticker": "😊 {username} sent a sticker",
"@sentASticker": { "@sentASticker": {
"type": "text", "type": "text",
"placeholders": { "placeholders": {
"username": {} "username": {}
} }
}, },
"sentAVideo": "{username} sent a video", "sentAVideo": "🎥 {username} sent a video",
"@sentAVideo": { "@sentAVideo": {
"type": "text", "type": "text",
"placeholders": { "placeholders": {

View file

@ -141,7 +141,9 @@ Future<void> _tryPushHelper(
final matrixLocals = MatrixLocals(l10n); final matrixLocals = MatrixLocals(l10n);
// Calculate the body // Calculate the body
final body = await event.calcLocalizedBody( final body = event.type == EventTypes.Encrypted
? l10n.newMessageInFluffyChat
: await event.calcLocalizedBody(
matrixLocals, matrixLocals,
plaintextBody: true, plaintextBody: true,
withSenderNamePrefix: false, withSenderNamePrefix: false,