From 79857b98b385b53dff49f8f0164422428cdddeb2 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Mon, 18 Jun 2018 14:08:47 -0700 Subject: [PATCH] Fix bug with quoted reply notifications. --- .../securesms/notifications/MessageNotifier.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java b/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java index 43ce881e8e..df846d47b0 100644 --- a/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java +++ b/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java @@ -441,20 +441,16 @@ public class MessageNotifier { } else { body = SpanUtil.italic(context.getString(R.string.MessageNotifier_unknown_contact_message)); } - } else if (record.isMms() && TextUtils.isEmpty(body)) { + } 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(); - } else if (record.isMms() && !record.isMmsNotification()) { + } else if (record.isMms() && !record.isMmsNotification() && !((MmsMessageRecord) record).getSlideDeck().getSlides().isEmpty()) { String message = context.getString(R.string.MessageNotifier_media_message_with_text, body); int italicLength = message.length() - body.length(); body = SpanUtil.italic(message, italicLength); slideDeck = ((MediaMmsMessageRecord)record).getSlideDeck(); } - if (record.isMms() && ((MmsMessageRecord) record).getQuote() != null && ((MmsMessageRecord) record).getSlideDeck().getSlides().isEmpty()) { - body = record.getDisplayBody(); - } - if (threadRecipients == null || !threadRecipients.isMuted()) { notificationState.addNotification(new NotificationItem(id, mms, recipient, conversationRecipient, threadRecipients, threadId, body, timestamp, slideDeck)); }