From e7d37160846a5fd9d463ccdc5d712bcca44c5503 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 23 Nov 2019 13:00:28 +0100 Subject: [PATCH] Delete instead of trash drafts set to encrypt --- app/src/main/java/eu/faircode/email/EntityOperation.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/EntityOperation.java b/app/src/main/java/eu/faircode/email/EntityOperation.java index 584ae11ec9..d2b50700fd 100644 --- a/app/src/main/java/eu/faircode/email/EntityOperation.java +++ b/app/src/main/java/eu/faircode/email/EntityOperation.java @@ -118,6 +118,12 @@ public class EntityOperation { for (Object value : values) jargs.put(value); + if (MOVE.equals(name) && message.encrypt != null && message.encrypt) { + EntityFolder folder = db.folder().getFolder(message.folder); + if (folder != null && EntityFolder.DRAFTS.equals(folder.type)) + name = DELETE; + } + if (SEEN.equals(name)) { boolean seen = jargs.getBoolean(0); boolean ignore = jargs.optBoolean(1, true);