mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-27 16:10:58 +01:00
Use attachment disposition for inline images
This commit is contained in:
@@ -630,7 +630,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
|
||||
List<EntityAttachment> images = new ArrayList<>();
|
||||
for (EntityAttachment attachment : attachments)
|
||||
if (attachment.cid == null && attachment.type.startsWith("image"))
|
||||
if (attachment.type.startsWith("image") && !attachment.isInline())
|
||||
images.add(attachment);
|
||||
adapterImage.set(images);
|
||||
rvImage.setVisibility(images.size() > 0 ? View.VISIBLE : View.INVISIBLE);
|
||||
@@ -1850,7 +1850,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
long id = args.getLong("id");
|
||||
List<EntityAttachment> attachments = DB.getInstance(context).attachment().getAttachments(id);
|
||||
for (EntityAttachment attachment : attachments)
|
||||
if (attachment.cid != null && !attachment.available)
|
||||
if (!attachment.available && attachment.isInline())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user