|
|
|
@ -301,9 +301,10 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
|
|
|
|
state.index = i + 1;
|
|
|
|
|
|
|
|
|
|
TupleMatch match = state.matches.get(i);
|
|
|
|
|
if (criteria.query != null &&
|
|
|
|
|
criteria.in_message &&
|
|
|
|
|
(match.matched == null || !match.matched))
|
|
|
|
|
boolean matched = (match.matched != null && match.matched);
|
|
|
|
|
|
|
|
|
|
if (criteria.query != null) {
|
|
|
|
|
if (!matched && criteria.in_message)
|
|
|
|
|
try {
|
|
|
|
|
File file = EntityMessage.getFile(context, match.id);
|
|
|
|
|
if (file.exists()) {
|
|
|
|
@ -311,14 +312,15 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
|
|
|
|
if (html.toLowerCase().contains(criteria.query)) {
|
|
|
|
|
String text = HtmlHelper.getFullText(html);
|
|
|
|
|
if (text.toLowerCase().contains(criteria.query))
|
|
|
|
|
match.matched = true;
|
|
|
|
|
matched = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (IOException ex) {
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (match.matched != null && match.matched) {
|
|
|
|
|
if (matched) {
|
|
|
|
|
found++;
|
|
|
|
|
Log.i("Boundary matched=" + match.id);
|
|
|
|
|
db.message().setMessageFound(match.id);
|
|
|
|
|