1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

Don't show "null" for partially downloaded messages with empty text body

This commit is contained in:
cketti 2011-05-16 00:36:46 +02:00
parent 41b039b691
commit 8fc714ac4a

View File

@ -2074,6 +2074,15 @@ public class LocalStore extends Store implements Serializable {
for (Part viewable : viewables) {
try {
String text = MimeUtility.getTextFromPart(viewable);
/*
* Small hack to make sure the string "null" doesn't end up
* in one of the StringBuffers.
*/
if (text == null) {
text = "";
}
/*
* Anything with MIME type text/html will be stored as such. Anything
* else will be stored as text/plain.
@ -2179,6 +2188,15 @@ public class LocalStore extends Store implements Serializable {
Part viewable = viewables.get(i);
try {
String text = MimeUtility.getTextFromPart(viewable);
/*
* Small hack to make sure the string "null" doesn't end up
* in one of the StringBuffers.
*/
if (text == null) {
text = "";
}
/*
* Anything with MIME type text/html will be stored as such. Anything
* else will be stored as text/plain.