Added email place holder

This commit is contained in:
M66B 2018-09-20 13:01:15 +00:00
parent d88212fc35
commit 6acb12f0c0
1 changed files with 5 additions and 1 deletions

View File

@ -864,9 +864,13 @@ public class FragmentCompose extends FragmentEx {
text = db.answer().getAnswer(answer).text;
String name = null;
if (draft.to != null && draft.to.length > 0)
String email = null;
if (draft.to != null && draft.to.length > 0) {
name = ((InternetAddress) draft.to[0]).getPersonal();
email = ((InternetAddress) draft.to[0]).getAddress();
}
text = text.replace("$name$", name == null ? "" : name);
text = text.replace("$email$", email == null ? "" : email);
}
draft.subject = context.getString(R.string.title_subject_reply, ref.subject);
body = String.format("%s<br><br>%s %s:<br><br><blockquote>%s</blockquote>",