mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-20 21:27:07 +00:00
Fixed downloading empty messages
This commit is contained in:
parent
a014dbf435
commit
f9e5914ff7
1 changed files with 2 additions and 2 deletions
|
@ -1435,7 +1435,7 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
|
||||
MessageHelper helper = new MessageHelper((MimeMessage) imessage);
|
||||
String html = helper.getHtml();
|
||||
String text = Jsoup.parse(html).text();
|
||||
String text = (html == null ? "" : Jsoup.parse(html).text());
|
||||
String preview = text.substring(0, Math.min(text.length(), PREVIEW_SIZE));
|
||||
message.write(this, html);
|
||||
db.message().setMessageContent(message.id, preview);
|
||||
|
@ -1896,7 +1896,7 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
if (!message.content)
|
||||
if (!metered || (message.size != null && message.size < download)) {
|
||||
String html = helper.getHtml();
|
||||
String text = Jsoup.parse(html).text();
|
||||
String text = (html == null ? "" : Jsoup.parse(html).text());
|
||||
String preview = text.substring(0, Math.min(text.length(), PREVIEW_SIZE));
|
||||
message.write(context, html);
|
||||
db.message().setMessageContent(message.id, preview);
|
||||
|
|
Loading…
Reference in a new issue