diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 7bad738187..9b52d943bb 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -3503,11 +3503,9 @@ public class AdapterMessage extends RecyclerView.Adapter(); properties.setAttachments(message.id, attachments); - SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); - boolean hide_attachments = prefs.getBoolean("hide_attachments", false); - + boolean hide_attachments = properties.getValue("hide_attachments", message.id); boolean show_inline = properties.getValue("inline", message.id); - Log.i("Show inline=" + show_inline); + Log.i("Hide attachments=" + hide_attachments + " Show inline=" + show_inline); int available = 0; int unavailable = 0; @@ -3547,14 +3545,14 @@ public class AdapterMessage extends RecyclerView.Adapter 0 && !hide_attachments ? View.VISIBLE : View.GONE); - vSeparatorAttachments.setVisibility(show.size() > 0 ? View.VISIBLE : View.GONE); + vSeparatorAttachments.setVisibility(attachments.size() > 0 ? View.VISIBLE : View.GONE); tvAttachments.setText(context.getResources() - .getQuantityString(R.plurals.title_attachments, show.size(), show.size())); - tvAttachments.setVisibility(show.size() > 0 && hide_attachments ? View.VISIBLE : View.GONE); + .getQuantityString(R.plurals.title_attachments, attachments.size(), attachments.size())); + tvAttachments.setVisibility(attachments.size() > 0 && hide_attachments ? View.VISIBLE : View.GONE); ibExpanderAttachments.setImageLevel(hide_attachments ? 1 /* more */ : 0 /* less */); - ibExpanderAttachments.setVisibility(show.size() > 0 ? View.VISIBLE : View.GONE); + ibExpanderAttachments.setVisibility(attachments.size() > 0 ? View.VISIBLE : View.GONE); cbInline.setChecked(show_inline); cbInline.setVisibility(has_inline && !hide_attachments ? View.VISIBLE : View.GONE); @@ -5257,8 +5255,8 @@ public class AdapterMessage extends RecyclerView.Adapter + + + app:layout_constraintTop_toBottomOf="@id/swHideAttachments" /> Number of preview lines Vertically align keywords, preview text, and notes Expand address details by default + Collapse attachments by default Show contents of compressed attachments Show attachments after the message text Show image thumbnails after the message text