Browse Source

Auto download attachments on unmetered connection

main
M66B 6 years ago
parent
commit
34884e7e85
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/src/main/java/eu/faircode/email/ServiceSynchronize.java

+ 2
- 2
app/src/main/java/eu/faircode/email/ServiceSynchronize.java View File

@ -1795,7 +1795,7 @@ public class ServiceSynchronize extends LifecycleService {
if (!fetch) if (!fetch)
for (EntityAttachment attachment : attachments) for (EntityAttachment attachment : attachments)
if (!attachment.available) if (!attachment.available)
if (attachment.size != null && attachment.size < ATTACHMENT_AUTO_DOWNLOAD_SIZE) {
if (!metered || (attachment.size != null && attachment.size < ATTACHMENT_AUTO_DOWNLOAD_SIZE)) {
fetch = true; fetch = true;
break; break;
} }
@ -1825,7 +1825,7 @@ public class ServiceSynchronize extends LifecycleService {
for (int i = 0; i < attachments.size(); i++) { for (int i = 0; i < attachments.size(); i++) {
EntityAttachment attachment = attachments.get(i); EntityAttachment attachment = attachments.get(i);
if (!attachment.available) if (!attachment.available)
if (attachment.size != null && attachment.size < ATTACHMENT_AUTO_DOWNLOAD_SIZE) {
if (!metered || (attachment.size != null && attachment.size < ATTACHMENT_AUTO_DOWNLOAD_SIZE)) {
if (iattachments == null) if (iattachments == null)
iattachments = helper.getAttachments(); iattachments = helper.getAttachments();
attachment.part = iattachments.get(i).part; attachment.part = iattachments.get(i).part;


Loading…
Cancel
Save