From 766710eadea0fef9cd6fa7cc903582fad1e0cffd Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 13 Jan 2022 14:30:20 +0100 Subject: [PATCH] Outbox and POP3 have no deleted flag --- app/src/main/java/eu/faircode/email/EntityOperation.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/EntityOperation.java b/app/src/main/java/eu/faircode/email/EntityOperation.java index ff49c74bab..85bc5dd3d9 100644 --- a/app/src/main/java/eu/faircode/email/EntityOperation.java +++ b/app/src/main/java/eu/faircode/email/EntityOperation.java @@ -406,7 +406,12 @@ public class EntityOperation { } else if (DELETE.equals(name)) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); boolean perform_expunge = prefs.getBoolean("perform_expunge", true); - if (perform_expunge) { + + EntityAccount account = db.account().getAccount(message.account); + + if (perform_expunge || + account == null || + account.protocol != EntityAccount.TYPE_IMAP) { message.ui_hide = true; db.message().setMessageUiHide(message.id, message.ui_hide); } else {