From bd489df9a563d49abcb09ac93ee263ad9fedff38 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 8 Aug 2018 11:58:50 +0000 Subject: [PATCH] Move messages from outbox to sent (if any) Fixes #24 --- .../main/java/eu/faircode/email/ServiceSynchronize.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 9dc81ea2..b0b45c24 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -824,8 +824,15 @@ public class ServiceSynchronize extends LifecycleService { msg.sent = new Date().getTime(); msg.seen = true; msg.ui_seen = true; + + EntityFolder sent = db.folder().getFolderByType(ident.account, EntityFolder.TYPE_SENT); + if (sent != null) { + Log.i(Helper.TAG, "Moving to sent folder=" + sent.id); + msg.folder = sent.id; + } + message.updateMessage(msg); - // TODO: purge sent messages + } finally { itransport.close(); }