Fix empty conversation update item text.

For some reason, if an EmojiTextView has a wrap content width and some other set of conditions occur, the view will not request a relayout when text changes.
This change inelegantly calls request layout more often to prevent that from happening.
This commit is contained in:
Cody Henthorne 2021-02-02 14:50:08 -05:00 committed by GitHub
parent c15ea8c0b4
commit 0d215d609b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,7 @@ import android.text.Spanned;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.ViewGroup;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
@ -137,6 +138,10 @@ public class EmojiTextView extends AppCompatTextView {
}
}
}
if (getLayoutParams() != null && getLayoutParams().width == ViewGroup.LayoutParams.WRAP_CONTENT) {
requestLayout();
}
}
public void setOverflowText(@Nullable CharSequence overflowText) {