Revert "Consider images without name as inline"

This reverts commit f88879f8df.
This commit is contained in:
M66B
2019-12-14 16:09:12 +01:00
parent 5c87d2464e
commit 006533b15e
4 changed files with 8 additions and 11 deletions

View File

@@ -1285,7 +1285,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
int inlineImages = 0;
if (attachments != null)
for (EntityAttachment attachment : attachments)
if (attachment.available && attachment.isInlineImage())
if (attachment.available && attachment.isInline() && attachment.isImage())
inlineImages++;
if (inlineImages != lastInlineImages) {
@@ -1647,7 +1647,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
List<EntityAttachment> a = new ArrayList<>();
for (EntityAttachment attachment : attachments) {
boolean inline = ((attachment.isInlineImage()) || attachment.encryption != null);
boolean inline = ((attachment.isInline() && attachment.isImage()) || attachment.encryption != null);
if (inline)
has_inline = true;
if (attachment.progress == null && !attachment.available)
@@ -1701,7 +1701,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
List<EntityAttachment> images = new ArrayList<>();
for (EntityAttachment attachment : attachments)
if (!attachment.isInlineImage())
if (!attachment.isInline() && attachment.isImage())
images.add(attachment);
adapterImage.set(images);
grpImages.setVisibility(images.size() > 0 ? View.VISIBLE : View.GONE);
@@ -2715,7 +2715,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
List<EntityAttachment> attachments = db.attachment().getAttachments(message.id);
for (EntityAttachment attachment : attachments)
if (attachment.isInlineImage() &&
if (attachment.isInline() && attachment.isImage() &&
attachment.progress == null && !attachment.available)
EntityOperation.queue(context, message, EntityOperation.ATTACHMENT, attachment.id);