Specify where to search

This commit is contained in:
M66B 2019-03-08 11:32:19 +00:00
parent b5b7f7a49c
commit 917fe43daa
1 changed files with 10 additions and 2 deletions

View File

@ -206,13 +206,21 @@ public class ViewModelBrowse extends ViewModel {
}
if (keywords)
arg.writeAtom("OR");
arg.writeAtom("TEXT");
arg.writeAtom("OR");
arg.writeAtom("OR");
arg.writeAtom("OR");
arg.writeAtom("FROM");
arg.writeBytes(state.search.getBytes());
arg.writeAtom("TO");
arg.writeBytes(state.search.getBytes());
arg.writeAtom("SUBJECT");
arg.writeBytes(state.search.getBytes());
arg.writeAtom("BODY");
arg.writeBytes(state.search.getBytes());
if (keywords) {
arg.writeAtom("KEYWORD");
arg.writeBytes(state.search.getBytes());
}
arg.writeAtom("ALL");
Response[] responses = protocol.command("SEARCH", arg);
List<Integer> msgnums = new ArrayList<>();