Hide unnamed attachments, layout improvements

This commit is contained in:
M66B
2019-02-11 08:38:46 +00:00
parent 28a7d33ba0
commit 05d26cbc70
3 changed files with 6 additions and 4 deletions

View File

@@ -109,6 +109,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
ivDelete.setVisibility(readonly ? View.GONE : attachment.isInline() ? View.INVISIBLE : View.VISIBLE);
tvName.setText(attachment.name);
tvType.setText(attachment.type);
tvType.setVisibility(debug || BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
if (attachment.size != null)
tvSize.setText(Helper.humanReadableByteCount(attachment.size, true));

View File

@@ -899,7 +899,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
boolean downloading = false;
List<EntityAttachment> 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;