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