mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
613f72e769
commit
ac55dcc31b
|
@ -713,11 +713,10 @@ public class EntityRule {
|
||||||
for (Address a : message.from)
|
for (Address a : message.from)
|
||||||
from.add(MessageHelper.formatAddresses(new Address[]{a}));
|
from.add(MessageHelper.formatAddresses(new Address[]{a}));
|
||||||
|
|
||||||
String text = null;
|
Document doc = null;
|
||||||
if (message != null && message.content)
|
if (message != null && message.content)
|
||||||
try {
|
try {
|
||||||
Document d = JsoupEx.parse(message.getFile(context));
|
doc = JsoupEx.parse(message.getFile(context));
|
||||||
text = d.text();
|
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
}
|
}
|
||||||
|
@ -739,7 +738,7 @@ public class EntityRule {
|
||||||
.with("to", to)
|
.with("to", to)
|
||||||
.with("from", from)
|
.with("from", from)
|
||||||
.with("subject", message == null ? null : Arrays.asList(message.subject))
|
.with("subject", message == null ? null : Arrays.asList(message.subject))
|
||||||
.with("text", Arrays.asList(text));
|
.with("text", doc == null ? null : Arrays.asList(doc.text()));
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean needsHeaders(Expression expression) {
|
static boolean needsHeaders(Expression expression) {
|
||||||
|
|
Loading…
Reference in New Issue