From abae41985313955eb0a0ae8b29de6d34015657a7 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Wed, 23 May 2018 14:32:46 -0400 Subject: [PATCH] Flatten multiline text snippets in search results. If a search result snippet spans two lines, we only show the first line. For the purpose of display, we first remove all newlines in order to make the full snippet visible. --- src/org/thoughtcrime/securesms/ConversationListItem.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/thoughtcrime/securesms/ConversationListItem.java b/src/org/thoughtcrime/securesms/ConversationListItem.java index 68515e4733..231de9c8ff 100644 --- a/src/org/thoughtcrime/securesms/ConversationListItem.java +++ b/src/org/thoughtcrime/securesms/ConversationListItem.java @@ -319,6 +319,8 @@ public class ConversationListItem extends RelativeLayout @Nullable String value, @Nullable String highlight) { + value = value != null ? value.replaceAll("\n", " ") : null; + if (value == null || highlight == null) { return new SpannableString(value); }