1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-03 13:44:40 +00:00

Simplification

This commit is contained in:
M66B 2019-01-09 18:21:16 +00:00
parent 1ce66e2540
commit bd35a625c2

View file

@ -1629,21 +1629,14 @@ public class FragmentCompose extends FragmentEx {
for (EntityAttachment attachment : attachments)
if (attachment.available &&
("forward".equals(action) || attachment.isInline())) {
EntityAttachment copy = new EntityAttachment();
copy.message = result.draft.id;
copy.sequence = ++sequence;
copy.name = attachment.name;
copy.type = attachment.type;
copy.disposition = attachment.disposition;
copy.cid = attachment.cid;
copy.encryption = attachment.encryption;
copy.size = attachment.size;
copy.progress = attachment.progress;
copy.available = attachment.available;
copy.id = db.attachment().insertAttachment(copy);
long orig = attachment.id;
attachment.id = null;
attachment.message = result.draft.id;
attachment.sequence = ++sequence;
attachment.id = db.attachment().insertAttachment(attachment);
File source = EntityAttachment.getFile(context, attachment.id);
File target = EntityAttachment.getFile(context, copy.id);
File source = EntityAttachment.getFile(context, orig);
File target = EntityAttachment.getFile(context, attachment.id);
Helper.copy(source, target);
}