|
|
|
@ -566,24 +566,21 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
|
|
|
|
|
Long sid = null;
|
|
|
|
|
EntityFolder sent = null;
|
|
|
|
|
|
|
|
|
|
if (reply_move && !TextUtils.isEmpty(message.inreplyto))
|
|
|
|
|
for (String inreplyto : message.inreplyto.split(" ")) {
|
|
|
|
|
List<EntityMessage> replied = db.message().getMessagesByMsgId(message.account, inreplyto);
|
|
|
|
|
if (replied != null)
|
|
|
|
|
for (EntityMessage m : replied)
|
|
|
|
|
if (!m.ui_hide) {
|
|
|
|
|
EntityFolder folder = db.folder().getFolder(m.folder);
|
|
|
|
|
if (folder != null &&
|
|
|
|
|
(EntityFolder.INBOX.equals(folder.type) ||
|
|
|
|
|
EntityFolder.ARCHIVE.equals(folder.type) ||
|
|
|
|
|
EntityFolder.USER.equals(folder.type))) {
|
|
|
|
|
sent = folder;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (reply_move && !TextUtils.isEmpty(message.inreplyto)) {
|
|
|
|
|
List<EntityMessage> replied = db.message().getMessagesByMsgId(message.account, message.inreplyto);
|
|
|
|
|
if (replied != null)
|
|
|
|
|
for (EntityMessage m : replied)
|
|
|
|
|
if (!m.ui_hide) {
|
|
|
|
|
EntityFolder folder = db.folder().getFolder(m.folder);
|
|
|
|
|
if (folder != null &&
|
|
|
|
|
(EntityFolder.INBOX.equals(folder.type) ||
|
|
|
|
|
EntityFolder.ARCHIVE.equals(folder.type) ||
|
|
|
|
|
EntityFolder.USER.equals(folder.type))) {
|
|
|
|
|
sent = folder;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (sent != null)
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (sent == null)
|
|
|
|
|
sent = db.folder().getFolderByType(message.account, EntityFolder.SENT);
|
|
|
|
@ -808,12 +805,11 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Mark replied
|
|
|
|
|
if (message.inreplyto != null)
|
|
|
|
|
for (String inreplyto : message.inreplyto.split(" ")) {
|
|
|
|
|
List<EntityMessage> replieds = db.message().getMessagesByMsgId(message.account, inreplyto);
|
|
|
|
|
for (EntityMessage replied : replieds)
|
|
|
|
|
EntityOperation.queue(this, replied, EntityOperation.ANSWERED, true);
|
|
|
|
|
}
|
|
|
|
|
if (message.inreplyto != null) {
|
|
|
|
|
List<EntityMessage> replieds = db.message().getMessagesByMsgId(message.account, message.inreplyto);
|
|
|
|
|
for (EntityMessage replied : replieds)
|
|
|
|
|
EntityOperation.queue(this, replied, EntityOperation.ANSWERED, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Mark forwarded
|
|
|
|
|
if (message.wasforwardedfrom != null) {
|
|
|
|
|