|
|
@ -648,9 +648,17 @@ class Core {
|
|
|
|
|
|
|
|
|
|
|
|
Long uid = findUid(context, ifolder, message.msgid, false);
|
|
|
|
Long uid = findUid(context, ifolder, message.msgid, false);
|
|
|
|
if (uid == null) {
|
|
|
|
if (uid == null) {
|
|
|
|
if (EntityFolder.DRAFTS.equals(folder.type) &&
|
|
|
|
if (EntityOperation.MOVE.equals(op.name) &&
|
|
|
|
EntityOperation.MOVE.equals(op.name))
|
|
|
|
EntityFolder.DRAFTS.equals(folder.type))
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
long fid = new JSONArray(op.args).optLong(0, -1L);
|
|
|
|
|
|
|
|
EntityFolder target = db.folder().getFolder(fid);
|
|
|
|
|
|
|
|
if (target != null && EntityFolder.TRASH.equals(folder.type))
|
|
|
|
db.message().deleteMessage(message.id);
|
|
|
|
db.message().deleteMessage(message.id);
|
|
|
|
|
|
|
|
} catch (JSONException ex) {
|
|
|
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
throw new IllegalArgumentException("Message not found for " + op.name + " folder=" + folder.name);
|
|
|
|
throw new IllegalArgumentException("Message not found for " + op.name + " folder=" + folder.name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|