Outbox: set received time to snoozed time

pull/207/head
M66B 3 years ago
parent 1c36a945bf
commit 13b8cf5791

@ -5966,6 +5966,17 @@ public class FragmentCompose extends FragmentBase {
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
draft.id = null;
draft.folder = outbox.id;
@ -5979,15 +5990,6 @@ public class FragmentCompose extends FragmentBase {
for (EntityAttachment attachment : attachments)
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
if (draft.ui_snoozed == null)
EntityOperation.queue(context, draft, EntityOperation.SEND);

Loading…
Cancel
Save