1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-29 11:15:51 +00:00

Optionally search on sent time

This commit is contained in:
M66B 2020-04-22 08:47:39 +02:00
parent c37d212042
commit 4fbb29df2e

View file

@ -1809,9 +1809,10 @@ class Core {
// Reduce list of local uids
Flags flags = ifolder.getPermanentFlags();
SearchTerm searchTerm = new ReceivedDateTerm(ComparisonTerm.GE, new Date(sync_time));
searchTerm = new OrTerm(searchTerm, new SentDateTerm(ComparisonTerm.GE, new Date(sync_time)));
if (sync_nodate)
if (sync_nodate) {
searchTerm = new OrTerm(searchTerm, new SentDateTerm(ComparisonTerm.GE, new Date(sync_time)));
searchTerm = new OrTerm(searchTerm, new ReceivedDateTerm(ComparisonTerm.LT, new Date(365 * 24 * 3600 * 1000L)));
}
if (sync_unseen && flags.contains(Flags.Flag.SEEN))
searchTerm = new OrTerm(searchTerm, new FlagTerm(new Flags(Flags.Flag.SEEN), false));
if (sync_flagged && flags.contains(Flags.Flag.FLAGGED))