From 7b353482f67ad03eeeb67bcf02427b789b9daae5 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 7 Sep 2018 13:04:54 +0000 Subject: [PATCH] Name placeholder for standard replies --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 78ce75e8..69bd16a6 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -751,8 +751,14 @@ public class FragmentCompose extends FragmentEx { if ("reply".equals(action) || "reply_all".equals(action)) { String text = ""; - if (answer > 0) + if (answer > 0) { text = db.answer().getAnswer(answer).text; + + String name = ""; + if (draft.to != null && draft.to.length > 0) + name = ((InternetAddress) draft.to[0]).getPersonal(); + text = text.replace("$name$", name); + } draft.subject = context.getString(R.string.title_subject_reply, ref.subject); body = String.format("%s

%s %s:

%s", text.replaceAll("\\r?\\n", "
"),