From e145b8171d81d38939633ffe90c4e61168dae595 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Tue, 28 Jul 2015 12:05:46 -0700 Subject: [PATCH] revert emoji ellipsizing temporarily it doesn't react to layout changes correct, better to not have it for the time being. closes #3718 closes #3812 // FREEBIE --- .../components/emoji/EmojiFilter.java | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/org/thoughtcrime/securesms/components/emoji/EmojiFilter.java b/src/org/thoughtcrime/securesms/components/emoji/EmojiFilter.java index 35af86af79..9c93875f3b 100644 --- a/src/org/thoughtcrime/securesms/components/emoji/EmojiFilter.java +++ b/src/org/thoughtcrime/securesms/components/emoji/EmojiFilter.java @@ -4,17 +4,13 @@ import android.text.InputFilter; import android.text.Spannable; import android.text.Spanned; import android.text.TextUtils; -import android.text.TextUtils.TruncateAt; -import android.view.View; -import android.view.ViewTreeObserver.OnGlobalLayoutListener; import android.widget.TextView; -public class EmojiFilter implements InputFilter, OnGlobalLayoutListener { +public class EmojiFilter implements InputFilter { private TextView view; public EmojiFilter(TextView view) { this.view = view; - view.getViewTreeObserver().addOnGlobalLayoutListener(this); } @Override public CharSequence filter(CharSequence source, int start, int end, @@ -26,18 +22,6 @@ public class EmojiFilter implements InputFilter, OnGlobalLayoutListener { if (source instanceof Spanned) { TextUtils.copySpansFrom((Spanned) source, start, end, null, emojified, 0); } - if (view.getWidth() == 0 || view.getEllipsize() != TruncateAt.END) { - return emojified; - } else { - return TextUtils.ellipsize(emojified, - view.getPaint(), - view.getWidth() - view.getPaddingRight() - view.getPaddingLeft(), - TruncateAt.END); - } - } - - @SuppressWarnings("deprecation") - @Override public void onGlobalLayout() { - view.invalidate(); + return emojified; } }