From 5ff9f690e60280f375867da53edaf2b175d67405 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 19 Oct 2018 07:52:05 +0000 Subject: [PATCH] Fixed time of original message when replying/forwarding --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index e4bc2814..d3c3e3cb 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -917,16 +917,18 @@ public class FragmentCompose extends FragmentEx { draft.from = ref.to; } + long time = (ref.sent == null ? ref.received : ref.sent); + if ("reply".equals(action) || "reply_all".equals(action)) { draft.subject = context.getString(R.string.title_subject_reply, ref.subject); body = String.format("

%s %s:

%s
", - Html.escapeHtml(new Date().toString()), + Html.escapeHtml(new Date(time).toString()), Html.escapeHtml(MessageHelper.getFormattedAddresses(draft.to, true)), HtmlHelper.sanitize(ref.read(context))); } else if ("forward".equals(action)) { draft.subject = context.getString(R.string.title_subject_forward, ref.subject); body = String.format("

%s %s:

%s
", - Html.escapeHtml(new Date().toString()), + Html.escapeHtml(new Date(time).toString()), Html.escapeHtml(MessageHelper.getFormattedAddresses(ref.from, true)), HtmlHelper.sanitize(ref.read(context))); }