Fixed sending with attachments

This commit is contained in:
M66B
2018-08-23 18:58:21 +00:00
parent 190daefe0e
commit 83cfee5711
2 changed files with 25 additions and 1 deletions

View File

@@ -965,9 +965,11 @@ public class FragmentCompose extends FragmentEx {
// Restore attachments
for (EntityAttachment attachment : attachments) {
File file = EntityAttachment.getFile(context, attachment.id);
attachment.id = null;
attachment.message = draft.id;
db.attachment().insertAttachment(attachment);
attachment.id = db.attachment().insertAttachment(attachment);
Helper.copy(file, EntityAttachment.getFile(context, attachment.id));
}
EntityOperation.queue(db, draft, EntityOperation.SEND);