1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-31 20:25:38 +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;
TupleMessageEx single = null;
TupleMessageEx see = null;
List<String> msgids = new ArrayList<>();
for (TupleMessageEx message : messages) {
if (message == null)
continue;
if (!message.duplicate &&
if ((message.msgid == null || !msgids.contains(message.msgid)) &&
!EntityFolder.DRAFTS.equals(message.folderType) &&
!EntityFolder.TRASH.equals(message.folderType)) {
count++;
@ -4776,6 +4777,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
if (message.folder == folder &&
!EntityFolder.OUTBOX.equals(message.folderType))
autoCloseCount++;
if (message.msgid != null)
msgids.add(message.msgid);
}
// Auto expand when: