mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-28 02:37:16 +00:00
Fixed encryption
This commit is contained in:
parent
f319b6e0c8
commit
9a190bd6c9
1 changed files with 4 additions and 3 deletions
|
@ -4076,7 +4076,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
for (EntityAttachment attachment : attachments)
|
for (EntityAttachment attachment : attachments)
|
||||||
if (!attachment.available)
|
if (!attachment.available)
|
||||||
throw new IllegalArgumentException(context.getString(R.string.title_attachments_missing));
|
throw new IllegalArgumentException(context.getString(R.string.title_attachments_missing));
|
||||||
else if (!attachment.isInline() && !attachment.isEncryption())
|
else if (attachment.isAttachment())
|
||||||
attached++;
|
attached++;
|
||||||
|
|
||||||
// Check for missing attachments
|
// Check for missing attachments
|
||||||
|
@ -4116,14 +4116,15 @@ public class FragmentCompose extends FragmentBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (EntityAttachment attachment : new ArrayList<>(attachments))
|
for (EntityAttachment attachment : new ArrayList<>(attachments))
|
||||||
if (attachment.isInline() && !cids.contains(attachment.cid)) {
|
if (attachment.isInline() && attachment.isImage() &&
|
||||||
|
!cids.contains(attachment.cid)) {
|
||||||
Log.i("Removing unused inline attachment cid=" + attachment.cid);
|
Log.i("Removing unused inline attachment cid=" + attachment.cid);
|
||||||
db.attachment().deleteAttachment(attachment.id);
|
db.attachment().deleteAttachment(attachment.id);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Convert inline images to attachments
|
// Convert inline images to attachments
|
||||||
for (EntityAttachment attachment : new ArrayList<>(attachments))
|
for (EntityAttachment attachment : new ArrayList<>(attachments))
|
||||||
if (attachment.isInline()) {
|
if (attachment.isInline() && attachment.isImage()) {
|
||||||
Log.i("Converting to attachment cid=" + attachment.cid);
|
Log.i("Converting to attachment cid=" + attachment.cid);
|
||||||
attachment.disposition = Part.ATTACHMENT;
|
attachment.disposition = Part.ATTACHMENT;
|
||||||
db.attachment().setDisposition(attachment.id, attachment.disposition);
|
db.attachment().setDisposition(attachment.id, attachment.disposition);
|
||||||
|
|
Loading…
Reference in a new issue