From 78005ab8693c5136d2d1c8d0ee1046096787938d Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 29 Oct 2018 08:14:12 +0000 Subject: [PATCH] Remove previously encrypted data --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 7196e497..6baa106e 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -578,6 +578,10 @@ public class FragmentCompose extends FragmentEx { try { db.beginTransaction(); + for (EntityAttachment attachment : db.attachment().getAttachments(id)) + if ("encrypted.asc".equals(attachment.name) || "signature.asc".equals(attachment.name)) + db.attachment().deleteAttachment(attachment.id); + int seq = db.attachment().getAttachmentSequence(id); attachment1.message = id;