Experiment: load alternative message part

This commit is contained in:
M66B
2022-02-13 09:53:03 +01:00
parent 55ac52f9a2
commit 125be871be
6 changed files with 86 additions and 5 deletions

View File

@@ -2842,6 +2842,10 @@ public class MessageHelper {
}
String getHtml(Context context) throws MessagingException, IOException {
return getHtml(context, false);
}
String getHtml(Context context, boolean plain_text) throws MessagingException, IOException {
if (text.size() == 0) {
Log.i("No body part");
return null;
@@ -2856,8 +2860,13 @@ public class MessageHelper {
parts.addAll(text);
else
for (PartHolder h : text)
if (h.isHtml())
parts.add(h);
if (plain_text) {
if (h.isPlainText())
parts.add(h);
} else {
if (h.isHtml())
parts.add(h);
}
parts.addAll(extra);