Refactoring

pull/174/head
M66B 5 years ago
parent bb81d7e3d1
commit bab2741e29

@ -3790,7 +3790,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (message.from != null && message.from.length > 0)
from = ((InternetAddress) message.from[0]).getAddress();
String text = HtmlHelper.getText(Helper.readText(file));
String html = Helper.readText(file);
String text = HtmlHelper.getText(html);
return new String[]{from, message.subject, text};
}

@ -817,7 +817,8 @@ public class FragmentCompose extends FragmentBase {
boolean plain = args.getBoolean("plain");
String body = args.getString("body");
Document doc = JsoupEx.parse(Helper.readText(EntityMessage.getFile(context, id)));
String rhtml = Helper.readText(EntityMessage.getFile(context, id));
Document doc = JsoupEx.parse(rhtml);
Elements ref = doc.select("div[fairemail=reference]");
ref.removeAttr("fairemail");
@ -3078,7 +3079,8 @@ public class FragmentCompose extends FragmentBase {
div.appendChild(p);
// Get referenced message body
Document d = JsoupEx.parse(Helper.readText(ref.getFile(context)));
String rhtml = Helper.readText(ref.getFile(context));
Document d = JsoupEx.parse(rhtml);
// Remove signature separators
boolean remove_signatures = prefs.getBoolean("remove_signatures", false);

@ -452,7 +452,8 @@ public class MessageHelper {
// https://www.ietf.org/rfc/rfc3798.txt
Multipart report = new MimeMultipart("report; report-type=disposition-notification");
String plainContent = HtmlHelper.getText(Helper.readText(message.getFile(context)));
String html = Helper.readText(message.getFile(context));
String plainContent = HtmlHelper.getText(html);
BodyPart plainPart = new MimeBodyPart();
plainPart.setContent(plainContent, "text/plain; charset=" + Charset.defaultCharset().name());
@ -483,7 +484,8 @@ public class MessageHelper {
}
// Build html body
Document document = JsoupEx.parse(Helper.readText(message.getFile(context)));
String html = Helper.readText(message.getFile(context));
Document document = JsoupEx.parse(html);
// When sending message
if (identity != null)

Loading…
Cancel
Save