Remove unused caching logic

Stephen Paul Weber created

The caching never helped much and was removed, this logic was causing
custom emoji replies to be detected as emoji-only even though they have
a quote at render time.

Change summary

src/main/java/eu/siacs/conversations/entities/Message.java | 7 -------
1 file changed, 7 deletions(-)

Detailed changes

src/main/java/eu/siacs/conversations/entities/Message.java 🔗

@@ -1071,30 +1071,24 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
             spannableBody = new SpannableStringBuilder(MessageUtils.filterLtrRtl(getBody(getInReplyTo() != null)).trim());
             spannableBody.setSpan(PLAIN_TEXT_SPAN, 0, spannableBody.length(), 0); // Let adapter know it can do more formatting
         } else {
-            boolean[] anyfallbackimg = new boolean[]{ false };
-
             SpannableStringBuilder spannable = new SpannableStringBuilder(Html.fromHtml(
                 MessageUtils.filterLtrRtl(html.toString()).trim(),
                 Html.FROM_HTML_MODE_COMPACT,
                 (source) -> {
                    try {
                        if (thumbnailer == null || source == null) {
-                           anyfallbackimg[0] = true;
                            return fallbackImg;
                        }
                        Cid cid = BobTransfer.cid(new URI(source));
                        if (cid == null) {
-                           anyfallbackimg[0] = true;
                            return fallbackImg;
                        }
                        Drawable thumbnail = thumbnailer.getThumbnail(cid);
                        if (thumbnail == null) {
-                           anyfallbackimg[0] = true;
                            return fallbackImg;
                        }
                        return thumbnail;
                    } catch (final URISyntaxException e) {
-                       anyfallbackimg[0] = true;
                        return fallbackImg;
                    }
                 },
@@ -1120,7 +1114,6 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
             // https://stackoverflow.com/a/10187511/8611
             int i = spannable.length();
             while(--i >= 0 && Character.isWhitespace(spannable.charAt(i))) { }
-            if (anyfallbackimg[0]) return (SpannableStringBuilder) spannable.subSequence(0, i+1);
             spannableBody = (SpannableStringBuilder) spannable.subSequence(0, i+1);
         }