From 37759ea1aafba63613d80fd2790c37fd26872be5 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 3 Sep 2019 10:53:59 +0200 Subject: [PATCH] Fixed permanently deleting thread --- .../main/java/eu/faircode/email/FragmentMessages.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 04ccd1c819..5aadc013b4 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -1923,8 +1923,13 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. for (long id : selected) { EntityMessage message = db.message().getMessage(id); - if (message != null && message.uid != null) - ids.add(message.id); + if (message != null) { + List messages = db.message().getMessagesByThread( + message.account, message.thread, threading ? null : id, message.folder); + for (EntityMessage threaded : messages) + if (message.uid != null) + ids.add(threaded.id); + } } db.setTransactionSuccessful();