|
|
@ -989,7 +989,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 = (TextUtils.isEmpty(attachment.name) ||
|
|
|
|
boolean inline = (TextUtils.isEmpty(attachment.name) ||
|
|
|
|
(attachment.isInline() && attachment.type.startsWith("image/")));
|
|
|
|
(attachment.isInline() && attachment.isImage()));
|
|
|
|
if (inline)
|
|
|
|
if (inline)
|
|
|
|
has_inline = true;
|
|
|
|
has_inline = true;
|
|
|
|
if (attachment.progress == null && !attachment.available)
|
|
|
|
if (attachment.progress == null && !attachment.available)
|
|
|
@ -1026,7 +1026,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.isInline() && attachment.type.startsWith("image/"))
|
|
|
|
if (!attachment.isInline() && attachment.isImage())
|
|
|
|
images.add(attachment);
|
|
|
|
images.add(attachment);
|
|
|
|
adapterImage.set(images);
|
|
|
|
adapterImage.set(images);
|
|
|
|
|
|
|
|
|
|
|
@ -2955,7 +2955,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
long id = args.getLong("id");
|
|
|
|
long id = args.getLong("id");
|
|
|
|
List<EntityAttachment> attachments = DB.getInstance(context).attachment().getAttachments(id);
|
|
|
|
List<EntityAttachment> attachments = DB.getInstance(context).attachment().getAttachments(id);
|
|
|
|
for (EntityAttachment attachment : attachments)
|
|
|
|
for (EntityAttachment attachment : attachments)
|
|
|
|
if (!attachment.available && attachment.isInline())
|
|
|
|
if (!attachment.available && attachment.isInline() && attachment.isImage())
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|