From 55f571de91105d15f3b53e5590083bd4e709a94d Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 26 Apr 2020 17:53:24 +0200 Subject: [PATCH] Revert "Permanently delete similar messages" This reverts commit 06cdd66ae2a5a11073699cc0647764bd7e8718e5. --- .../eu/faircode/email/EntityOperation.java | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/EntityOperation.java b/app/src/main/java/eu/faircode/email/EntityOperation.java index 23a5de40ff..18b620f174 100644 --- a/app/src/main/java/eu/faircode/email/EntityOperation.java +++ b/app/src/main/java/eu/faircode/email/EntityOperation.java @@ -299,32 +299,10 @@ public class EntityOperation { return; - } else if (DELETE.equals(name)) { + } else if (DELETE.equals(name)) db.message().setMessageUiHide(message.id, true); - // Delete Gmail corresponding archive message - EntityFolder folder = db.folder().getFolder(message.folder); - if (folder != null && !EntityFolder.ARCHIVE.equals(folder.type)) { - boolean user = false; - boolean archive = false; - List similars = db.message().getMessagesBySimilarity(message.account, message.id, message.msgid); - for (EntityMessage similar : similars) - if (!similar.id.equals(message.id)) { - EntityFolder f = db.folder().getFolder(similar.folder); - if (f == null || EntityFolder.USER.equals(f.type)) - user = true; - if (f != null && EntityFolder.ARCHIVE.equals(f.type)) - archive = true; - } - if (archive && !user) { - for (EntityMessage similar : similars) - if (!similar.id.equals(message.id)) { - db.message().setMessageUiHide(similar.id, true); - queue(context, similar.account, similar.folder, similar.id, name, jargs); - } - } - } - } else if (ATTACHMENT.equals(name)) + else if (ATTACHMENT.equals(name)) db.attachment().setProgress(jargs.getLong(0), 0); queue(context, message.account, message.folder, message.id, name, jargs);