Need the span so we have the source even with no icon

(cherry picked from commit 9b4f2dcd22c320719a48865483079f8bfd68f6b7)
This commit is contained in:
Stephen Paul Weber 2024-12-09 17:00:33 -05:00 committed by Arne
parent 9434f31915
commit 238ce10c91

View file

@ -213,7 +213,7 @@ public class EmojiSearch {
public SpannableStringBuilder toInsert() {
SpannableStringBuilder builder = new SpannableStringBuilder(toString());
if (icon != null) builder.setSpan(new InlineImageSpan(icon, source), 0, builder.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
builder.setSpan(new InlineImageSpan(icon == null ? new android.graphics.drawable.ColorDrawable(0) : icon, source), 0, builder.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
return builder;
}