Browse Source

Search on to address

main
M66B 6 years ago
parent
commit
64493bb573
1 changed files with 9 additions and 2 deletions
  1. +9
    -2
      app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java

+ 9
- 2
app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java View File

@ -43,6 +43,7 @@ import javax.mail.UIDFolder;
import javax.mail.search.BodyTerm; import javax.mail.search.BodyTerm;
import javax.mail.search.FromStringTerm; import javax.mail.search.FromStringTerm;
import javax.mail.search.OrTerm; import javax.mail.search.OrTerm;
import javax.mail.search.RecipientStringTerm;
import javax.mail.search.SubjectTerm; import javax.mail.search.SubjectTerm;
import androidx.lifecycle.GenericLifecycleObserver; import androidx.lifecycle.GenericLifecycleObserver;
@ -167,10 +168,16 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
else else
imessages = ifolder.search( imessages = ifolder.search(
new OrTerm( new OrTerm(
new FromStringTerm(search),
new OrTerm(
new FromStringTerm(search),
new RecipientStringTerm(Message.RecipientType.TO, search)
),
new OrTerm( new OrTerm(
new SubjectTerm(search), new SubjectTerm(search),
new BodyTerm(search))));
new BodyTerm(search)
)
)
);
Log.i(Helper.TAG, "Boundary found messages=" + imessages.length); Log.i(Helper.TAG, "Boundary found messages=" + imessages.length);
index = imessages.length - 1; index = imessages.length - 1;


Loading…
Cancel
Save