From 0476713778cbfcadec4c32a8f3c681f2b0c37073 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 5 Dec 2018 19:19:50 +0100 Subject: [PATCH] Simplification --- .../java/eu/faircode/email/FragmentMessages.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 7ac555d603..2a07a5ce73 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -525,17 +525,11 @@ public class FragmentMessages extends FragmentEx { result.target = target; - if (thread) { - List messages = db.message().getMessageByThread( - message.account, message.thread, threading ? null : id, message.folder, message.ui_found); - for (EntityMessage threaded : messages) - result.ids.add(threaded.id); - } else - result.ids.add(message.id); - - for (long mid : result.ids) { - Log.i(Helper.TAG, "Move hide id=" + mid + " target=" + result.target.name); - db.message().setMessageUiHide(mid, true); + List messages = db.message().getMessageByThread( + message.account, message.thread, threading && thread ? null : id, message.folder, message.ui_found); + for (EntityMessage threaded : messages) { + result.ids.add(threaded.id); + db.message().setMessageUiHide(threaded.id, true); } db.setTransactionSuccessful();