commit
da84ed2866
2 changed files with 10 additions and 4 deletions
|
@ -291,8 +291,14 @@ public class SearchUICore {
|
|||
return null;
|
||||
}
|
||||
|
||||
public <T extends SearchCoreAPI> SearchResultCollection shallowSearch(Class<T> cl,
|
||||
String text, final ResultMatcher<SearchResult> matcher) throws IOException {
|
||||
public <T extends SearchCoreAPI> SearchResultCollection shallowSearch(Class<T> cl, String text,
|
||||
ResultMatcher<SearchResult> matcher) throws IOException {
|
||||
return shallowSearch(cl, text, matcher, true, true);
|
||||
}
|
||||
|
||||
public <T extends SearchCoreAPI> SearchResultCollection shallowSearch(Class<T> cl, String text,
|
||||
final ResultMatcher<SearchResult> matcher,
|
||||
boolean resortAll, boolean removeDuplicates) throws IOException {
|
||||
T api = getApiByClass(cl);
|
||||
if (api != null) {
|
||||
if (debugMode) {
|
||||
|
@ -306,7 +312,7 @@ public class SearchUICore {
|
|||
|
||||
SearchResultCollection collection = new SearchResultCollection(
|
||||
sphrase);
|
||||
collection.addSearchResults(rm.getRequestResults(), true, true);
|
||||
collection.addSearchResults(rm.getRequestResults(), resortAll, removeDuplicates);
|
||||
if (debugMode) {
|
||||
LOG.info("Finish shallow search <" + sphrase + "> Results=" + rm.getRequestResults().size());
|
||||
}
|
||||
|
|
|
@ -1507,7 +1507,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
|||
private void reloadHistoryInternal() {
|
||||
if (historySearchFragment != null) {
|
||||
try {
|
||||
SearchResultCollection res = searchUICore.shallowSearch(SearchHistoryAPI.class, "", null);
|
||||
SearchResultCollection res = searchUICore.shallowSearch(SearchHistoryAPI.class, "", null, false, false);
|
||||
List<QuickSearchListItem> rows = new ArrayList<>();
|
||||
if (res != null) {
|
||||
for (SearchResult sr : res.getCurrentSearchResults()) {
|
||||
|
|
Loading…
Reference in a new issue