Use attachment disposition for inline images

This commit is contained in:
M66B
2019-01-06 11:00:08 +00:00
parent ae1a36b482
commit 2be2d10c27
10 changed files with 1314 additions and 38 deletions

View File

@@ -103,7 +103,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
}
private void bindTo(EntityAttachment attachment) {
ivDelete.setVisibility(readonly ? View.GONE : View.VISIBLE);
ivDelete.setVisibility(readonly ? View.GONE : attachment.isInline() ? View.INVISIBLE : View.VISIBLE);
tvName.setText(attachment.name);
if (attachment.size != null)
@@ -128,7 +128,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
progressbar.setVisibility(
attachment.progress == null || attachment.available ? View.GONE : View.VISIBLE);
tvType.setText(attachment.type + " " + attachment.cid + " " + attachment.encryption);
tvType.setText(attachment.type + " " + attachment.disposition + " " + attachment.cid + " " + attachment.encryption);
tvType.setVisibility(debug ? View.VISIBLE : View.GONE);
}