|
|
@ -4484,38 +4484,56 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
|
|
|
|
|
|
|
if (message.from != null && message.from.length > 0) {
|
|
|
|
if (message.from != null && message.from.length > 0) {
|
|
|
|
Element span = document.createElement("span");
|
|
|
|
Element span = document.createElement("span");
|
|
|
|
span.text(getString(R.string.title_from) + " " + MessageHelper.formatAddresses(message.from));
|
|
|
|
Element strong = document.createElement("strong");
|
|
|
|
p.append(span.html() + "<br>");
|
|
|
|
strong.text(getString(R.string.title_from));
|
|
|
|
|
|
|
|
span.appendChild(strong);
|
|
|
|
|
|
|
|
span.appendText(" " + MessageHelper.formatAddresses(message.from));
|
|
|
|
|
|
|
|
span.appendElement("br");
|
|
|
|
|
|
|
|
p.appendChild(span);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (message.to != null && message.to.length > 0) {
|
|
|
|
if (message.to != null && message.to.length > 0) {
|
|
|
|
Element span = document.createElement("span");
|
|
|
|
Element span = document.createElement("span");
|
|
|
|
span.text(getString(R.string.title_to) + " " + MessageHelper.formatAddresses(message.to));
|
|
|
|
Element strong = document.createElement("strong");
|
|
|
|
p.append(span.html() + "<br>");
|
|
|
|
strong.text(getString(R.string.title_to));
|
|
|
|
|
|
|
|
span.appendChild(strong);
|
|
|
|
|
|
|
|
span.appendText(" " + MessageHelper.formatAddresses(message.to));
|
|
|
|
|
|
|
|
span.appendElement("br");
|
|
|
|
|
|
|
|
p.appendChild(span);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (message.cc != null && message.cc.length > 0) {
|
|
|
|
if (message.cc != null && message.cc.length > 0) {
|
|
|
|
Element span = document.createElement("span");
|
|
|
|
Element span = document.createElement("span");
|
|
|
|
span.text(getString(R.string.title_cc) + " " + MessageHelper.formatAddresses(message.cc));
|
|
|
|
Element strong = document.createElement("strong");
|
|
|
|
p.append(span.html() + "<br>");
|
|
|
|
strong.text(getString(R.string.title_cc));
|
|
|
|
|
|
|
|
span.appendChild(strong);
|
|
|
|
|
|
|
|
span.appendText(" " + MessageHelper.formatAddresses(message.cc));
|
|
|
|
|
|
|
|
span.appendElement("br");
|
|
|
|
|
|
|
|
p.appendChild(span);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Element span = document.createElement("span");
|
|
|
|
|
|
|
|
DateFormat DTF = Helper.getDateTimeInstance(context, SimpleDateFormat.LONG, SimpleDateFormat.LONG);
|
|
|
|
DateFormat DTF = Helper.getDateTimeInstance(context, SimpleDateFormat.LONG, SimpleDateFormat.LONG);
|
|
|
|
span.text(getString(R.string.title_received) + " " + DTF.format(message.received));
|
|
|
|
|
|
|
|
p.append(span.html() + "<br>");
|
|
|
|
Element span = document.createElement("span");
|
|
|
|
|
|
|
|
Element strong = document.createElement("strong");
|
|
|
|
|
|
|
|
strong.text(getString(R.string.title_received));
|
|
|
|
|
|
|
|
span.appendChild(strong);
|
|
|
|
|
|
|
|
span.appendText(" " + DTF.format(message.received));
|
|
|
|
|
|
|
|
span.appendElement("br");
|
|
|
|
|
|
|
|
p.appendChild(span);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!TextUtils.isEmpty(message.subject)) {
|
|
|
|
if (!TextUtils.isEmpty(message.subject)) {
|
|
|
|
Element span = document.createElement("span");
|
|
|
|
Element span = document.createElement("span");
|
|
|
|
span.text(message.subject);
|
|
|
|
span.appendText(message.subject);
|
|
|
|
p.append(span.html() + "<br>");
|
|
|
|
span.appendElement("br");
|
|
|
|
|
|
|
|
p.appendChild(span);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
p.append("<hr><br>");
|
|
|
|
p.appendElement("hr").appendElement("br");
|
|
|
|
|
|
|
|
|
|
|
|
body.prepend(p.html());
|
|
|
|
body.prependChild(p);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return new String[]{message.subject, document.html()};
|
|
|
|
return new String[]{message.subject, document.html()};
|
|
|
|