Fixed placeholders standard answers

This commit is contained in:
M66B 2018-09-12 05:51:16 +00:00
parent 674a22f95d
commit b69ceb7464
1 changed files with 2 additions and 2 deletions

View File

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