From a829165f2daf962575c2dff1831dc93c6fca543f Mon Sep 17 00:00:00 2001 From: Alex Hart Date: Wed, 13 Dec 2023 14:13:10 -0400 Subject: [PATCH] Clone overflow spannable in attempt to reduce flickering. --- .../thoughtcrime/securesms/components/emoji/EmojiTextView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/emoji/EmojiTextView.java b/app/src/main/java/org/thoughtcrime/securesms/components/emoji/EmojiTextView.java index 4846702ee4b..136dbfb3712 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/emoji/EmojiTextView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/emoji/EmojiTextView.java @@ -355,7 +355,7 @@ private void ellipsizeEmojiTextForMaxLines() { } int overflowEnd = getLayout().getLineEnd(maxLines); - CharSequence overflow = getText().subSequence(overflowStart, overflowEnd); + CharSequence overflow = new SpannableString(getText().subSequence(overflowStart, overflowEnd).toString()); float adjust = overflowText != null ? getPaint().measureText(overflowText, 0, overflowText.length()) : 0f; CharSequence ellipsized = TextUtils.ellipsize(overflow, getPaint(), getWidth() - adjust, TextUtils.TruncateAt.END);