From 05d26cbc70483eaed8e8d1d72b9ade187d3f9f9a Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 11 Feb 2019 08:38:46 +0000 Subject: [PATCH] Hide unnamed attachments, layout improvements --- app/src/main/java/eu/faircode/email/AdapterAttachment.java | 1 + app/src/main/java/eu/faircode/email/AdapterMessage.java | 2 +- app/src/main/res/layout/item_attachment.xml | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterAttachment.java b/app/src/main/java/eu/faircode/email/AdapterAttachment.java index acf440d535..056d6fa817 100644 --- a/app/src/main/java/eu/faircode/email/AdapterAttachment.java +++ b/app/src/main/java/eu/faircode/email/AdapterAttachment.java @@ -109,6 +109,7 @@ public class AdapterAttachment extends RecyclerView.Adapter a = new ArrayList<>(); for (EntityAttachment attachment : attachments) { - if (attachment.isInline()) + if (attachment.isInline() || TextUtils.isEmpty(attachment.name)) inline = true; if (attachment.progress == null && !attachment.available) download = true; diff --git a/app/src/main/res/layout/item_attachment.xml b/app/src/main/res/layout/item_attachment.xml index e274b5b425..e96dbdd05a 100644 --- a/app/src/main/res/layout/item_attachment.xml +++ b/app/src/main/res/layout/item_attachment.xml @@ -8,8 +8,9 @@