|
|
@ -5966,6 +5966,17 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
outbox.id = db.folder().insertFolder(outbox);
|
|
|
|
outbox.id = db.folder().insertFolder(outbox);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Delay sending message
|
|
|
|
|
|
|
|
if (draft.ui_snoozed == null && send_delayed != 0) {
|
|
|
|
|
|
|
|
if (extras.getBoolean("now"))
|
|
|
|
|
|
|
|
draft.ui_snoozed = null;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
draft.ui_snoozed = new Date().getTime() + send_delayed * 1000L;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (draft.ui_snoozed != null)
|
|
|
|
|
|
|
|
draft.received = draft.ui_snoozed;
|
|
|
|
|
|
|
|
|
|
|
|
// Copy message to outbox
|
|
|
|
// Copy message to outbox
|
|
|
|
draft.id = null;
|
|
|
|
draft.id = null;
|
|
|
|
draft.folder = outbox.id;
|
|
|
|
draft.folder = outbox.id;
|
|
|
@ -5979,15 +5990,6 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
for (EntityAttachment attachment : attachments)
|
|
|
|
for (EntityAttachment attachment : attachments)
|
|
|
|
db.attachment().setMessage(attachment.id, draft.id);
|
|
|
|
db.attachment().setMessage(attachment.id, draft.id);
|
|
|
|
|
|
|
|
|
|
|
|
// Delay sending message
|
|
|
|
|
|
|
|
if (draft.ui_snoozed == null && send_delayed != 0) {
|
|
|
|
|
|
|
|
if (extras.getBoolean("now"))
|
|
|
|
|
|
|
|
draft.ui_snoozed = null;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
draft.ui_snoozed = new Date().getTime() + send_delayed * 1000L;
|
|
|
|
|
|
|
|
db.message().setMessageSnoozed(draft.id, draft.ui_snoozed);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Send message
|
|
|
|
// Send message
|
|
|
|
if (draft.ui_snoozed == null)
|
|
|
|
if (draft.ui_snoozed == null)
|
|
|
|
EntityOperation.queue(context, draft, EntityOperation.SEND);
|
|
|
|
EntityOperation.queue(context, draft, EntityOperation.SEND);
|
|
|
|