Drafts can change accounts

pull/162/head
M66B 5 years ago
parent d67cf4ffa7
commit 8a09282b09

@ -472,6 +472,10 @@ class Core {
// Add message // Add message
DB db = DB.getInstance(context); DB db = DB.getInstance(context);
// Drafts can change accounts
if (jargs.length() == 0 && !folder.id.equals(message.folder))
throw new IllegalArgumentException("Message folder changed");
// Get arguments // Get arguments
long target = jargs.optLong(0, folder.id); long target = jargs.optLong(0, folder.id);
boolean autoread = jargs.optBoolean(1, false); boolean autoread = jargs.optBoolean(1, false);

@ -214,8 +214,7 @@ public class EntityOperation {
// Cross account move // Cross account move
if (!source.account.equals(target.account)) if (!source.account.equals(target.account))
if (message.raw != null && message.raw && if (message.raw != null && message.raw) {
message.getRawFile(context).exists()) {
name = ADD; name = ADD;
folder = target.id; folder = target.id;
} else } else

Loading…
Cancel
Save