1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-03 13:44:40 +00:00

Use message IDs for auto expand

This commit is contained in:
M66B 2021-01-13 12:34:00 +01:00
parent 101356032a
commit 039b713a65

View file

@ -4758,11 +4758,12 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
int unseen = 0; int unseen = 0;
TupleMessageEx single = null; TupleMessageEx single = null;
TupleMessageEx see = null; TupleMessageEx see = null;
List<String> msgids = new ArrayList<>();
for (TupleMessageEx message : messages) { for (TupleMessageEx message : messages) {
if (message == null) if (message == null)
continue; continue;
if (!message.duplicate && if ((message.msgid == null || !msgids.contains(message.msgid)) &&
!EntityFolder.DRAFTS.equals(message.folderType) && !EntityFolder.DRAFTS.equals(message.folderType) &&
!EntityFolder.TRASH.equals(message.folderType)) { !EntityFolder.TRASH.equals(message.folderType)) {
count++; count++;
@ -4776,6 +4777,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
if (message.folder == folder && if (message.folder == folder &&
!EntityFolder.OUTBOX.equals(message.folderType)) !EntityFolder.OUTBOX.equals(message.folderType))
autoCloseCount++; autoCloseCount++;
if (message.msgid != null)
msgids.add(message.msgid);
} }
// Auto expand when: // Auto expand when: