Reply to sender

Fixes #38
pull/50/head
M66B 6 years ago
parent 6cadda6c0a
commit 43fb46615e

@ -19,8 +19,6 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B) Copyright 2018 by Marcel Bokhorst (M66B)
*/ */
import android.text.TextUtils;
import java.util.Date; import java.util.Date;
import java.util.Random; import java.util.Random;

@ -538,9 +538,19 @@ public class FragmentCompose extends FragmentEx {
return draft; return draft;
EntityMessage ref = db.message().getMessage(reference); EntityMessage ref = db.message().getMessage(reference);
if (ref != null) if (ref != null) {
account = ref.account; account = ref.account;
// Reply to sender
EntityFolder rfolder = db.folder().getFolder(ref.folder);
if (EntityFolder.SENT.equals(rfolder.type)) {
Address[] tmp = ref.to;
ref.to = ref.from;
ref.reply = null;
ref.from = tmp;
}
}
EntityFolder drafts; EntityFolder drafts;
drafts = db.folder().getFolderByType(account, EntityFolder.DRAFTS); drafts = db.folder().getFolderByType(account, EntityFolder.DRAFTS);
if (drafts == null) if (drafts == null)

Loading…
Cancel
Save