Search on BCC too

pull/178/head
M66B 5 years ago
parent a51c1a5098
commit 1b9e373591

@ -404,6 +404,7 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
if (criteria.in_receipients) {
or.add(new RecipientStringTerm(Message.RecipientType.TO, search));
or.add(new RecipientStringTerm(Message.RecipientType.CC, search));
or.add(new RecipientStringTerm(Message.RecipientType.BCC, search));
}
if (criteria.in_subject)
or.add(new SubjectTerm(search));

@ -283,6 +283,7 @@ public interface DaoMessage {
" OR `from` LIKE :find COLLATE NOCASE" +
" OR `to` LIKE :find COLLATE NOCASE" +
" OR `cc` LIKE :find COLLATE NOCASE" +
" OR `bcc` LIKE :find COLLATE NOCASE" +
" OR `subject` LIKE :find COLLATE NOCASE" +
" OR `keywords` LIKE :find COLLATE NOCASE" +
" OR `preview` LIKE :find COLLATE NOCASE) AS matched" +

@ -82,6 +82,8 @@ public class FtsDbHelper extends SQLiteOpenHelper {
address.addAll(Arrays.asList(message.to));
if (message.cc != null)
address.addAll(Arrays.asList(message.cc));
if (message.bcc != null)
address.addAll(Arrays.asList(message.bcc));
delete(db, message.id);

Loading…
Cancel
Save