Browse Source

Added email place holder

main
M66B 6 years ago
parent
commit
6acb12f0c0
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      app/src/main/java/eu/faircode/email/FragmentCompose.java

+ 5
- 1
app/src/main/java/eu/faircode/email/FragmentCompose.java View File

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


Loading…
Cancel
Save