Keep encryption related attachments

This commit is contained in:
M66B 2019-11-17 11:03:22 +01:00
parent f1606ebb37
commit d39c17424e
1 changed files with 3 additions and 1 deletions

View File

@ -4141,7 +4141,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
Helper.writeText(message.getFile(context), html);
// Remove existing attachments
db.attachment().deleteAttachments(id);
for (EntityAttachment attachment : attachments)
if (attachment.encryption == null)
db.attachment().deleteAttachment(attachment.id);
// Add decrypted attachments
List<EntityAttachment> remotes = parts.getAttachments();