mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-16 14:42:21 +01:00
Reply to un-downloaded image, we may not have cids
(cherry picked from commit 69d556e252edac724108ffeb189068cf25c87125)
This commit is contained in:
parent
b6dcca4eba
commit
eadf37fbfa
1 changed files with 2 additions and 2 deletions
|
@ -1178,8 +1178,8 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
|
|||
final var quote = getInReplyTo().getSpannableBody(thumbnailer, fallbackImg);
|
||||
if ((getInReplyTo().isFileOrImage() || getInReplyTo().isOOb()) && getInReplyTo().getFileParams() != null) {
|
||||
quote.insert(0, "🖼️");
|
||||
final var cid = getInReplyTo().getFileParams().getCids().get(0);
|
||||
Drawable thumbnail = thumbnailer == null ? null : thumbnailer.getThumbnail(cid);
|
||||
final var cid = getInReplyTo().getFileParams().getCids().size() < 1 ? null : getInReplyTo().getFileParams().getCids().get(0);
|
||||
Drawable thumbnail = thumbnailer == null || cid == null ? null : thumbnailer.getThumbnail(cid);
|
||||
if (thumbnail == null) thumbnail = fallbackImg;
|
||||
if (thumbnail != null) {
|
||||
quote.setSpan(new InlineImageSpan(thumbnail, cid.toString()), 0, 2, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
|
|
Loading…
Reference in a new issue