mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-14 13:35:04 -05:00
Fix global search
This commit is contained in:
parent
d703286833
commit
a4585657d1
@ -140,17 +140,22 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
|
||||
if (intent.getStringExtra(SearchManager.QUERY) != null) {
|
||||
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
|
||||
//Query was received from Search Dialog
|
||||
Bundle appData = getIntent().getBundleExtra(SearchManager.APP_DATA);
|
||||
if (appData != null) {
|
||||
mSearch = new LocalSearch();
|
||||
mSearch.addAccountUuid(appData.getString(EXTRA_SEARCH_ACCOUNT));
|
||||
mSearch.addAllowedFolder(appData.getString(EXTRA_SEARCH_FOLDER));
|
||||
|
||||
String query = intent.getStringExtra(SearchManager.QUERY);
|
||||
|
||||
mSearch = new LocalSearch(getString(R.string.search_results));
|
||||
mNoThreading = true;
|
||||
|
||||
mSearch.or(new SearchCondition(Searchfield.SENDER, Attribute.CONTAINS, query));
|
||||
mSearch.or(new SearchCondition(Searchfield.SUBJECT, Attribute.CONTAINS, query));
|
||||
|
||||
Bundle appData = getIntent().getBundleExtra(SearchManager.APP_DATA);
|
||||
if (appData != null) {
|
||||
mSearch.addAccountUuid(appData.getString(EXTRA_SEARCH_ACCOUNT));
|
||||
mSearch.addAllowedFolder(appData.getString(EXTRA_SEARCH_FOLDER));
|
||||
|
||||
mIsRemote = true;
|
||||
} else {
|
||||
mSearch.addAccountUuid(LocalSearch.ALL_ACCOUNTS);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user