mirror of https://github.com/M66B/FairEmail.git
Prevent searching for empty keywords (non ascii)
This commit is contained in:
parent
e113b3a5d1
commit
f2d2577fbf
|
@ -762,8 +762,13 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
||||||
or.add(new SubjectTerm(search));
|
or.add(new SubjectTerm(search));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_keywords && hasKeywords)
|
if (in_keywords && hasKeywords) {
|
||||||
or.add(new FlagTerm(new Flags(MessageHelper.sanitizeKeyword(search)), true));
|
String keyword = MessageHelper.sanitizeKeyword(search);
|
||||||
|
if (TextUtils.isEmpty(keyword))
|
||||||
|
Log.w("Keyword empty=" + search);
|
||||||
|
else
|
||||||
|
or.add(new FlagTerm(new Flags(keyword), true));
|
||||||
|
}
|
||||||
|
|
||||||
if (in_message)
|
if (in_message)
|
||||||
if (plus.size() + minus.size() + opt.size() == 0)
|
if (plus.size() + minus.size() + opt.size() == 0)
|
||||||
|
|
Loading…
Reference in New Issue