|
|
@ -557,19 +557,18 @@ public class MessageHelper {
|
|
|
|
Document document = JsoupEx.parse(message.getFile(context));
|
|
|
|
Document document = JsoupEx.parse(message.getFile(context));
|
|
|
|
|
|
|
|
|
|
|
|
// When sending message
|
|
|
|
// When sending message
|
|
|
|
if (identity != null) {
|
|
|
|
if (identity != null && send) {
|
|
|
|
if (send) {
|
|
|
|
for (Element child : document.body().children())
|
|
|
|
for (Element child : document.body().children())
|
|
|
|
if (!TextUtils.isEmpty(child.text()) &&
|
|
|
|
if (!TextUtils.isEmpty(child.text()) &&
|
|
|
|
TextUtils.isEmpty(child.attr("fairemail"))) {
|
|
|
|
TextUtils.isEmpty(child.attr("fairemail"))) {
|
|
|
|
String style = HtmlHelper.mergeStyles(
|
|
|
|
String style = HtmlHelper.mergeStyles(
|
|
|
|
"font-family:" + compose_font, child.attr("style"));
|
|
|
|
"font-family:" + compose_font, child.attr("style"));
|
|
|
|
child.attr("style", style);
|
|
|
|
child.attr("style", style);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
document.select("div[fairemail=signature]").removeAttr("fairemail");
|
|
|
|
document.select("div[fairemail=signature]").removeAttr("fairemail");
|
|
|
|
document.select("div[fairemail=reference]").removeAttr("fairemail");
|
|
|
|
document.select("div[fairemail=reference]").removeAttr("fairemail");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean save = false;
|
|
|
|
DB db = DB.getInstance(context);
|
|
|
|
DB db = DB.getInstance(context);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
db.beginTransaction();
|
|
|
|
db.beginTransaction();
|
|
|
@ -615,6 +614,7 @@ public class MessageHelper {
|
|
|
|
|
|
|
|
|
|
|
|
attachments.add(attachment);
|
|
|
|
attachments.add(attachment);
|
|
|
|
img.attr("src", "cid:" + cid);
|
|
|
|
img.attr("src", "cid:" + cid);
|
|
|
|
|
|
|
|
save = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
db.setTransactionSuccessful();
|
|
|
|
db.setTransactionSuccessful();
|
|
|
@ -623,6 +623,9 @@ public class MessageHelper {
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
db.endTransaction();
|
|
|
|
db.endTransaction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (save)
|
|
|
|
|
|
|
|
Helper.writeText(message.getFile(context), document.html());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// multipart/mixed
|
|
|
|
// multipart/mixed
|
|
|
|