Fix spoiler rendering in quotes.

This commit is contained in:
Cody Henthorne
2023-03-24 15:22:46 -04:00
parent 7eb00e41a2
commit f53679f24a
4 changed files with 43 additions and 28 deletions

View File

@@ -256,11 +256,11 @@ public class SearchRepository {
if (ranges != null) {
updatedBody = SpannableString.valueOf(updatedBody);
MessageStyler.style(result.getMessageId(), BodyRangeUtil.adjustBodyRanges(ranges, bodyAdjustments), (Spannable) updatedBody);
MessageStyler.style(result.getReceivedTimestampMs(), BodyRangeUtil.adjustBodyRanges(ranges, bodyAdjustments), (Spannable) updatedBody);
updatedSnippet = SpannableString.valueOf(updatedSnippet);
//noinspection ConstantConditions
updateSnippetWithStyles(result.getMessageId(), updatedBody, (SpannableString) updatedSnippet, BodyRangeUtil.adjustBodyRanges(ranges, snippetAdjustments));
updateSnippetWithStyles(result.getReceivedTimestampMs(), updatedBody, (SpannableString) updatedSnippet, BodyRangeUtil.adjustBodyRanges(ranges, snippetAdjustments));
}
updatedResults.add(new MessageResult(result.getConversationRecipient(), result.getMessageRecipient(), updatedBody, updatedSnippet, result.getThreadId(), result.getMessageId(), result.getReceivedTimestampMs(), result.isMms()));
@@ -361,7 +361,7 @@ public class SearchRepository {
SpannableString body = new SpannableString(record.getBody());
if (bodyRanges != null) {
MessageStyler.style(record.getId(), bodyRanges, body);
MessageStyler.style(record.getDateSent(), bodyRanges, body);
}
CharSequence updatedBody = MentionUtil.updateBodyAndMentionsWithDisplayNames(context, body, mentions).getBody();