mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 03:15:39 +01:00
Debug: fixed header / HTML search
This commit is contained in:
@@ -823,20 +823,26 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
||||
}
|
||||
|
||||
if (criteria.in_headers) {
|
||||
if (contains(message.headers, criteria.query, partial, false))
|
||||
if (message.headers != null && message.headers.contains(criteria.query))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (criteria.in_message)
|
||||
if (criteria.in_html || criteria.in_message)
|
||||
try {
|
||||
File file = EntityMessage.getFile(context, message.id);
|
||||
if (file.exists()) {
|
||||
String html = Helper.readText(file);
|
||||
if (contains(html, criteria.query, partial, true)) {
|
||||
String text = HtmlHelper.getFullText(html);
|
||||
if (contains(text, criteria.query, partial, false))
|
||||
if (criteria.in_html) {
|
||||
if (html.contains(criteria.query))
|
||||
return true;
|
||||
}
|
||||
if (criteria.in_message) {
|
||||
if (contains(html, criteria.query, partial, true)) {
|
||||
String text = HtmlHelper.getFullText(html);
|
||||
if (contains(text, criteria.query, partial, false))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
Log.e(ex);
|
||||
|
||||
Reference in New Issue
Block a user