From b0f639b58ea1b1b1e5830aaf26ca08fb4267a68b Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 23 Nov 2018 14:53:42 +0100 Subject: [PATCH] Skip duplicate messages for auto expand/close --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 4d57f42b18..cc10258b38 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -1305,9 +1305,7 @@ public class FragmentMessages extends FragmentEx { TupleMessageEx single = null; TupleMessageEx see = null; for (TupleMessageEx message : messages) - if (!EntityFolder.ARCHIVE.equals(message.folderType) && - !EntityFolder.TRASH.equals(message.folderType) && - !EntityFolder.isOutgoing(message.folderType)) { + if (!message.duplicate && !EntityFolder.TRASH.equals(message.folderType)) { autoCount++; single = message; if (!message.ui_seen) { @@ -1339,9 +1337,7 @@ public class FragmentMessages extends FragmentEx { int count = 0; for (int i = 0; i < messages.size(); i++) { TupleMessageEx message = messages.get(i); - if (!EntityFolder.ARCHIVE.equals(message.folderType) && - !EntityFolder.TRASH.equals(message.folderType) && - !EntityFolder.isOutgoing(message.folderType)) + if (!message.duplicate && !EntityFolder.TRASH.equals(message.folderType)) count++; } Log.i(Helper.TAG, "Auto close=" + count);