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.
fork-5.53.8
Greyson Parrelli 2018-05-23 14:32:46 -04:00
rodzic 71ccbf2a1b
commit abae419853
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -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);
}