From f4e4784f73dc6b643c91c166bc47b21d6554e75d Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 30 Oct 2019 08:43:57 +0100 Subject: [PATCH] Skip adding drafts to be encrypted to remote folder --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 5695b1069f..5b1ea07229 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -2514,7 +2514,8 @@ public class FragmentCompose extends FragmentBase { } } - EntityOperation.queue(context, data.draft, EntityOperation.ADD); + if (data.draft.encrypt == null || !data.draft.encrypt) + EntityOperation.queue(context, data.draft, EntityOperation.ADD); } else { if (data.draft.content) { File file = data.draft.getFile(context); @@ -2782,7 +2783,7 @@ public class FragmentCompose extends FragmentBase { draft.ui_hide = ui_hide; db.message().updateMessage(draft); - if (draft.content) + if (draft.content && (draft.encrypt == null || !draft.encrypt)) EntityOperation.queue(context, draft, EntityOperation.ADD); } @@ -2962,7 +2963,8 @@ public class FragmentCompose extends FragmentBase { action == R.id.action_redo || action == R.id.action_check) { if (BuildConfig.DEBUG || dirty) - EntityOperation.queue(context, draft, EntityOperation.ADD); + if (draft.encrypt == null || !draft.encrypt) + EntityOperation.queue(context, draft, EntityOperation.ADD); if (action == R.id.action_check) { // Check data