mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 10:01:22 +01:00
Added option to disable image thumbnails
This commit is contained in:
@@ -249,6 +249,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
private boolean preview_italic;
|
||||
private int preview_lines;
|
||||
private boolean attachments_alt;
|
||||
private boolean thumbnails;
|
||||
private boolean contrast;
|
||||
private boolean monospaced;
|
||||
private boolean inline;
|
||||
@@ -2353,9 +2354,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
});
|
||||
|
||||
List<EntityAttachment> images = new ArrayList<>();
|
||||
for (EntityAttachment attachment : attachments)
|
||||
if (attachment.isAttachment() && attachment.isImage())
|
||||
images.add(attachment);
|
||||
if (thumbnails)
|
||||
for (EntityAttachment attachment : attachments)
|
||||
if (attachment.isAttachment() && attachment.isImage())
|
||||
images.add(attachment);
|
||||
adapterImage.set(images);
|
||||
grpImages.setVisibility(images.size() > 0 ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
@@ -4997,6 +4999,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
this.preview_italic = prefs.getBoolean("preview_italic", true);
|
||||
this.preview_lines = prefs.getInt("preview_lines", 2);
|
||||
this.attachments_alt = prefs.getBoolean("attachments_alt", false);
|
||||
this.thumbnails = prefs.getBoolean("thumbnails", true);
|
||||
this.contrast = prefs.getBoolean("contrast", false);
|
||||
this.monospaced = prefs.getBoolean("monospaced", false);
|
||||
this.inline = prefs.getBoolean("inline_images", false);
|
||||
|
||||
Reference in New Issue
Block a user