From 238ce10c916868d6052decf4d5460cc983d7895d Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 9 Dec 2024 17:00:33 -0500 Subject: [PATCH] Need the span so we have the source even with no icon (cherry picked from commit 9b4f2dcd22c320719a48865483079f8bfd68f6b7) --- src/monocleschat/java/de/monocles/chat/EmojiSearch.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/monocleschat/java/de/monocles/chat/EmojiSearch.java b/src/monocleschat/java/de/monocles/chat/EmojiSearch.java index 9314a1c41..87ca5cd13 100644 --- a/src/monocleschat/java/de/monocles/chat/EmojiSearch.java +++ b/src/monocleschat/java/de/monocles/chat/EmojiSearch.java @@ -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; }