mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-26 10:55:09 +01:00
Shortcut server search
This commit is contained in:
@@ -886,6 +886,23 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
||||
|
||||
private static final String FROM = "from:";
|
||||
|
||||
boolean onServer() {
|
||||
if (query == null)
|
||||
return false;
|
||||
|
||||
for (String w : query.trim().split("\\s+"))
|
||||
if (w.length() > 1 && w.startsWith("+"))
|
||||
return true;
|
||||
else if (w.length() > 1 && w.startsWith("-"))
|
||||
return true;
|
||||
else if (w.length() > 1 && w.startsWith("?"))
|
||||
return true;
|
||||
else if (w.length() > FROM.length() && w.startsWith(FROM))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
SearchTerm getTerms(boolean utf8, Flags flags, String[] keywords) {
|
||||
List<SearchTerm> or = new ArrayList<>();
|
||||
List<SearchTerm> and = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user