mirror of https://github.com/M66B/FairEmail.git
Search on to address
This commit is contained in:
parent
6bb0d05478
commit
64493bb573
|
@ -43,6 +43,7 @@ import javax.mail.UIDFolder;
|
|||
import javax.mail.search.BodyTerm;
|
||||
import javax.mail.search.FromStringTerm;
|
||||
import javax.mail.search.OrTerm;
|
||||
import javax.mail.search.RecipientStringTerm;
|
||||
import javax.mail.search.SubjectTerm;
|
||||
|
||||
import androidx.lifecycle.GenericLifecycleObserver;
|
||||
|
@ -166,11 +167,17 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
|||
imessages = ifolder.getMessages();
|
||||
else
|
||||
imessages = ifolder.search(
|
||||
new OrTerm(
|
||||
new OrTerm(
|
||||
new FromStringTerm(search),
|
||||
new RecipientStringTerm(Message.RecipientType.TO, search)
|
||||
),
|
||||
new OrTerm(
|
||||
new SubjectTerm(search),
|
||||
new BodyTerm(search))));
|
||||
new BodyTerm(search)
|
||||
)
|
||||
)
|
||||
);
|
||||
Log.i(Helper.TAG, "Boundary found messages=" + imessages.length);
|
||||
|
||||
index = imessages.length - 1;
|
||||
|
|
Loading…
Reference in New Issue