|
|
|
@ -1547,6 +1547,15 @@ public class ServiceSynchronize extends LifecycleService {
|
|
|
|
|
if (imessage == null)
|
|
|
|
|
throw new MessageRemovedException();
|
|
|
|
|
|
|
|
|
|
if (EntityFolder.ARCHIVE.equals(folder.type) &&
|
|
|
|
|
!(EntityFolder.JUNK.equals(target.type) || EntityFolder.TRASH.equals(target.type))) {
|
|
|
|
|
MimeMessageEx icopy = MessageHelper.from(this, message, isession);
|
|
|
|
|
Folder itarget = istore.getFolder(target.name);
|
|
|
|
|
itarget.appendMessages(new Message[]{icopy});
|
|
|
|
|
|
|
|
|
|
db.message().setMessageUiHide(message.id, false);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
if (istore.hasCapability("MOVE")) {
|
|
|
|
|
Folder itarget = istore.getFolder(target.name);
|
|
|
|
|
ifolder.moveMessages(new Message[]{imessage}, itarget);
|
|
|
|
@ -1562,9 +1571,7 @@ public class ServiceSynchronize extends LifecycleService {
|
|
|
|
|
Folder itarget = istore.getFolder(target.name);
|
|
|
|
|
itarget.appendMessages(new Message[]{icopy});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (EntityFolder.ARCHIVE.equals(folder.type))
|
|
|
|
|
db.message().setMessageUiHide(message.id, false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void doDelete(EntityFolder folder, IMAPFolder ifolder, EntityMessage message, JSONArray jargs, DB db) throws MessagingException, JSONException {
|
|
|
|
|