mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 17:18:50 -05:00
Fixed MimeUtility.extractTextual() when loading messages from the server
This commit is contained in:
parent
dbf38dae65
commit
3fa8081e88
@ -3304,12 +3304,12 @@ public class MimeUtility {
|
|||||||
MimeMultipart multipart = (MimeMultipart) firstBody;
|
MimeMultipart multipart = (MimeMultipart) firstBody;
|
||||||
for (int i = 0, count = multipart.getCount(); i < count; i++) {
|
for (int i = 0, count = multipart.getCount(); i < count; i++) {
|
||||||
BodyPart bodyPart = multipart.getBodyPart(i);
|
BodyPart bodyPart = multipart.getBodyPart(i);
|
||||||
if (bodyPart.getBody() instanceof TextBody) {
|
String bodyText = getTextFromPart(bodyPart);
|
||||||
TextBody textBody = (TextBody) bodyPart.getBody();
|
if (bodyText != null) {
|
||||||
if ("".equals(text) && bodyPart.isMimeType("text/plain")) {
|
if (text.length() == 0 && bodyPart.isMimeType("text/plain")) {
|
||||||
text = textBody.getText();
|
text = bodyText;
|
||||||
} else if ("".equals(html) && bodyPart.isMimeType("text/html")) {
|
} else if (html.length() == 0 && bodyPart.isMimeType("text/html")) {
|
||||||
html = textBody.getText();
|
html = bodyText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user