Highlight all the message search matches.

It is expected that when a user search for a message, that all the
matches within the same messages are highlighted (if there are more than
one match) not just the first match. This is also consistent with how
the search in the desktop app is implemented.

Resolves #13960
This commit is contained in:
Abdullah Emad
2025-02-01 22:13:52 +01:00
committed by Alex Hart
parent dfdb8f699a
commit 869b5aa3d5

View File

@@ -414,7 +414,7 @@ open class V2ConversationItemTextOnlyViewHolder<Model : MappingModel<Model>>(
linkifyMessageBody(styledText)
}
styledText = SearchUtil.getHighlightedSpan(Locale.getDefault(), STYLE_FACTORY, styledText, conversationContext.searchQuery, SearchUtil.STRICT)
styledText = SearchUtil.getHighlightedSpan(Locale.getDefault(), STYLE_FACTORY, styledText, conversationContext.searchQuery, SearchUtil.MATCH_ALL)
if (record.hasExtraText()) {
binding.body.setOverflowText(getLongMessageSpan())
} else {