|
|
|
|
@ -2176,7 +2176,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
|
|
|
|
|
List<EntityAttachment> attachments = (attachments_alt
|
|
|
|
|
? new ArrayList<>() : properties.getAttachments(message.id));
|
|
|
|
|
bindAttachments(message, attachments, false);
|
|
|
|
|
bindAttachments(message, attachments, false, false);
|
|
|
|
|
|
|
|
|
|
// Actions
|
|
|
|
|
vSeparator.setVisibility(View.VISIBLE);
|
|
|
|
|
@ -2308,7 +2308,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
(inlineImages > lastInlineImages && (show_images || inline)))
|
|
|
|
|
bindBody(message, false);
|
|
|
|
|
|
|
|
|
|
bindAttachments(message, attachments, true);
|
|
|
|
|
bindAttachments(message, attachments, true, true);
|
|
|
|
|
|
|
|
|
|
if (!scroll)
|
|
|
|
|
properties.ready(message.id);
|
|
|
|
|
@ -2354,7 +2354,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (!attachments_alt && bind)
|
|
|
|
|
bindAttachments(message, data.attachments, false);
|
|
|
|
|
bindAttachments(message, data.attachments, false, false);
|
|
|
|
|
|
|
|
|
|
boolean hasInbox = false;
|
|
|
|
|
boolean hasArchive = false;
|
|
|
|
|
@ -3768,7 +3768,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
? View.VISIBLE : View.INVISIBLE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void bindAttachments(final TupleMessageEx message, @Nullable List<EntityAttachment> attachments, boolean bind_extras) {
|
|
|
|
|
private void bindAttachments(final TupleMessageEx message, @Nullable List<EntityAttachment> attachments,
|
|
|
|
|
boolean bind_extras, boolean bind_media) {
|
|
|
|
|
if (attachments == null)
|
|
|
|
|
attachments = new ArrayList<>();
|
|
|
|
|
properties.setAttachments(message.id, attachments);
|
|
|
|
|
@ -3848,9 +3849,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
if (calendar != null && bind_extras)
|
|
|
|
|
bindCalendar(message, calendar);
|
|
|
|
|
|
|
|
|
|
if (bind_media) {
|
|
|
|
|
int iavailable = 0;
|
|
|
|
|
List<EntityAttachment> media = new ArrayList<>();
|
|
|
|
|
if (thumbnails && !EntityFolder.JUNK.equals(message.folderType) && bind_extras) {
|
|
|
|
|
if (thumbnails && !EntityFolder.JUNK.equals(message.folderType)) {
|
|
|
|
|
for (EntityAttachment attachment : attachments) {
|
|
|
|
|
String type = attachment.getMimeType();
|
|
|
|
|
if ((pdf_preview && attachment.isPDF()) ||
|
|
|
|
|
@ -3874,6 +3876,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
? View.VISIBLE : View.GONE);
|
|
|
|
|
ibShareImages.setVisibility(iavailable > 0 ? View.VISIBLE : View.GONE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void bindCalendar(final TupleMessageEx message, EntityAttachment attachment) {
|
|
|
|
|
// https://tools.ietf.org/html/rfc5546
|
|
|
|
|
@ -5738,13 +5741,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
boolean hide_attachments = properties.getValue("hide_attachments", message.id, hide_attachments_default);
|
|
|
|
|
properties.setValue("hide_attachments", message.id, !hide_attachments);
|
|
|
|
|
cowner.restart();
|
|
|
|
|
bindAttachments(message, properties.getAttachments(message.id), false);
|
|
|
|
|
bindAttachments(message, properties.getAttachments(message.id), false, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void onShowInlineAttachments(TupleMessageEx message, boolean isChecked) {
|
|
|
|
|
properties.setValue("inline", message.id, isChecked);
|
|
|
|
|
cowner.restart();
|
|
|
|
|
bindAttachments(message, properties.getAttachments(message.id), false);
|
|
|
|
|
bindAttachments(message, properties.getAttachments(message.id), false, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void onSaveAttachments(TupleMessageEx message) {
|
|
|
|
|
|