mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Fix bug with quoted reply notifications.
This commit is contained in:
parent
0c3535cff8
commit
79857b98b3
@ -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));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user