|
|
@ -1044,8 +1044,12 @@ public class ServiceSynchronize extends LifecycleService {
|
|
|
|
|
|
|
|
|
|
|
|
long id = MimeMessageEx.getId(imessage);
|
|
|
|
long id = MimeMessageEx.getId(imessage);
|
|
|
|
message = db.message().getMessage(id);
|
|
|
|
message = db.message().getMessage(id);
|
|
|
|
if (message != null && message.folder != folder.id)
|
|
|
|
if (message != null && message.folder != folder.id) {
|
|
|
|
message = null; // Archive
|
|
|
|
if (EntityFolder.TYPE_ARCHIVE.equals(folder.type))
|
|
|
|
|
|
|
|
message = null;
|
|
|
|
|
|
|
|
else // Outbox to sent
|
|
|
|
|
|
|
|
message.folder = folder.id;
|
|
|
|
|
|
|
|
}
|
|
|
|
boolean update = (message != null);
|
|
|
|
boolean update = (message != null);
|
|
|
|
if (message == null)
|
|
|
|
if (message == null)
|
|
|
|
message = new EntityMessage();
|
|
|
|
message = new EntityMessage();
|
|
|
|