|
|
@ -1919,9 +1919,14 @@ public class ServiceSynchronize extends LifecycleService {
|
|
|
|
|
|
|
|
|
|
|
|
// Download attachment
|
|
|
|
// Download attachment
|
|
|
|
MessageHelper helper = new MessageHelper((MimeMessage) imessage);
|
|
|
|
MessageHelper helper = new MessageHelper((MimeMessage) imessage);
|
|
|
|
EntityAttachment a = helper.getAttachments().get(sequence - 1);
|
|
|
|
List<EntityAttachment> attachments = helper.getAttachments();
|
|
|
|
attachment.part = a.part;
|
|
|
|
if (sequence - 1 < attachments.size()) {
|
|
|
|
attachment.download(this, db);
|
|
|
|
attachment.part = attachments.get(sequence - 1).part;
|
|
|
|
|
|
|
|
attachment.download(this, db);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
db.attachment().setProgress(attachment.id, null);
|
|
|
|
|
|
|
|
throw new IllegalArgumentException("Attachment not found seq=" + sequence + " size=" + attachments.size());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void synchronizeFolders(EntityAccount account, IMAPStore istore, ServiceState state) throws MessagingException {
|
|
|
|
private void synchronizeFolders(EntityAccount account, IMAPStore istore, ServiceState state) throws MessagingException {
|
|
|
|