mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
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.
This commit is contained in:
parent
71ccbf2a1b
commit
abae419853
@ -319,6 +319,8 @@ public class ConversationListItem extends RelativeLayout
|
|||||||
@Nullable String value,
|
@Nullable String value,
|
||||||
@Nullable String highlight)
|
@Nullable String highlight)
|
||||||
{
|
{
|
||||||
|
value = value != null ? value.replaceAll("\n", " ") : null;
|
||||||
|
|
||||||
if (value == null || highlight == null) {
|
if (value == null || highlight == null) {
|
||||||
return new SpannableString(value);
|
return new SpannableString(value);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user