diff --git a/app/src/main/java/eu/faircode/email/ViewModelBrowse.java b/app/src/main/java/eu/faircode/email/ViewModelBrowse.java index 2dbc0e4c96..f9dda3b8e2 100644 --- a/app/src/main/java/eu/faircode/email/ViewModelBrowse.java +++ b/app/src/main/java/eu/faircode/email/ViewModelBrowse.java @@ -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 msgnums = new ArrayList<>();