From d575867d6b7afefb7adf7326ce5ee936279dcad4 Mon Sep 17 00:00:00 2001 From: Ryan ZHAO Date: Thu, 3 Sep 2020 15:07:59 +1000 Subject: [PATCH] show attachment emoji in notification --- .../securesms/notifications/DefaultMessageNotifier.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java b/src/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java index 6945c05027..974667cb6f 100644 --- a/src/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java +++ b/src/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java @@ -479,13 +479,13 @@ public class DefaultMessageNotifier implements MessageNotifier { body = SpanUtil.italic(context.getString(R.string.MessageNotifier_sticker)); slideDeck = ((MmsMessageRecord) record).getSlideDeck(); } else if (record.isMms() && TextUtils.isEmpty(body) && !((MmsMessageRecord) record).getSlideDeck().getSlides().isEmpty()) { - body = SpanUtil.italic(context.getString(R.string.MessageNotifier_media_message)); slideDeck = ((MediaMmsMessageRecord)record).getSlideDeck(); + body = SpanUtil.italic(slideDeck.getBody()); } else if (record.isMms() && !record.isMmsNotification() && !((MmsMessageRecord) record).getSlideDeck().getSlides().isEmpty()) { - String message = context.getString(R.string.MessageNotifier_media_message_with_text, body); + slideDeck = ((MediaMmsMessageRecord)record).getSlideDeck(); + String message = slideDeck.getBody() + ": " + record.getBody(); int italicLength = message.length() - body.length(); body = SpanUtil.italic(message, italicLength); - slideDeck = ((MediaMmsMessageRecord)record).getSlideDeck(); } if (threadRecipients == null || !threadRecipients.isMuted()) {