");
+ String language = HtmlHelper.getLanguage(this, body);
+ String preview = HtmlHelper.getPreview(body);
+
try {
db.beginTransaction();
@@ -557,9 +560,9 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
Helper.writeText(file, body);
db.message().setMessageContent(message.id,
true,
- HtmlHelper.getLanguage(this, body),
+ language,
parts.isPlainOnly(),
- HtmlHelper.getPreview(body),
+ preview,
parts.getWarnings(message.warning));
EntityAttachment.copy(this, id, message.id);
diff --git a/app/src/main/java/eu/faircode/email/ServiceUI.java b/app/src/main/java/eu/faircode/email/ServiceUI.java
index 9cae9d7342..0354fbd874 100644
--- a/app/src/main/java/eu/faircode/email/ServiceUI.java
+++ b/app/src/main/java/eu/faircode/email/ServiceUI.java
@@ -288,6 +288,9 @@ public class ServiceUI extends IntentService {
if (body != null)
body = "
" + body.replaceAll("\\r?\\n", "
") + "
";
+ String language = HtmlHelper.getLanguage(this, body);
+ String preview = HtmlHelper.getPreview(body);
+
DB db = DB.getInstance(this);
try {
db.beginTransaction();
@@ -330,9 +333,9 @@ public class ServiceUI extends IntentService {
db.message().setMessageContent(reply.id,
true,
- HtmlHelper.getLanguage(this, body),
+ language,
plain_only || ref.plain_only,
- HtmlHelper.getPreview(body),
+ preview,
null);
EntityOperation.queue(this, reply, EntityOperation.SEND);