mirror of https://github.com/M66B/FairEmail.git
Skip deleting empty attachments
This commit is contained in:
parent
af3fee7e85
commit
43e7f9670d
|
@ -85,7 +85,8 @@ public class FragmentDialogDeleteAttachments extends FragmentDialogBase {
|
|||
if (attachments == null)
|
||||
attachments = new ArrayList<>();
|
||||
for (EntityAttachment attachment : attachments)
|
||||
if (attachment.encryption == null)
|
||||
if (attachment.encryption == null &&
|
||||
(attachment.size == null || attachment.size > 0))
|
||||
attachment.selected = true;
|
||||
adapter.set(attachments);
|
||||
}
|
||||
|
@ -165,7 +166,8 @@ public class FragmentDialogDeleteAttachments extends FragmentDialogBase {
|
|||
private void bindTo(EntityAttachment attachment) {
|
||||
cbEnabled.setText(attachment.name);
|
||||
cbEnabled.setChecked(attachment.selected);
|
||||
cbEnabled.setEnabled(attachment.encryption == null);
|
||||
cbEnabled.setEnabled(attachment.encryption == null &&
|
||||
(attachment.size == null || attachment.size > 0));
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (!TextUtils.isEmpty(attachment.type))
|
||||
|
|
Loading…
Reference in New Issue