From a8b99b316031f9ef56f79091943e19cbe474f915 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 18 Nov 2019 19:55:37 +0100 Subject: [PATCH] Fixed reply/forward encrypted message --- .../main/java/eu/faircode/email/FragmentCompose.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index d835d62321..12c48baba8 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -2317,7 +2317,9 @@ public class FragmentCompose extends FragmentBase { data.draft.subject = status + ": " + ref.subject; if (ref.plain_only != null && ref.plain_only) - data.draft.plain_only = ref.plain_only; + data.draft.plain_only = true; + if (ref.encrypt != null && ref.encrypt) + data.draft.encrypt = true; if (answer > 0) { EntityAnswer a = db.answer().getAnswer(answer); @@ -2557,12 +2559,7 @@ public class FragmentCompose extends FragmentBase { int sequence = 0; List attachments = db.attachment().getAttachments(ref.id); for (EntityAttachment attachment : attachments) - if (attachment.encryption != null && - attachment.encryption.equals(EntityAttachment.PGP_MESSAGE)) { - data.draft.encrypt = true; - db.message().setMessageEncrypt(data.draft.id, true); - - } else if (attachment.encryption == null && + if (attachment.encryption == null && ("forward".equals(action) || "editasnew".equals(action) || (attachment.isInline() && attachment.isImage()))) { if (attachment.available) {