Added sort on fly for search

This commit is contained in:
Alexey Kulish 2016-11-04 12:13:16 +03:00
parent 247c323f27
commit c817bea103

View file

@ -1110,7 +1110,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
if (!paused && !cancelPrev) { if (!paused && !cancelPrev) {
boolean append = getResultCollection() != null; boolean append = getResultCollection() != null;
if (append) { if (append) {
getResultCollection().addSearchResults(apiResults, false, true); getResultCollection().addSearchResults(apiResults, true, true);
} else { } else {
SearchResultCollection resCollection = new SearchResultCollection(phrase); SearchResultCollection resCollection = new SearchResultCollection(phrase);
resCollection.addSearchResults(apiResults, true, true); resCollection.addSearchResults(apiResults, true, true);
@ -1131,7 +1131,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
if (!paused && !cancelPrev) { if (!paused && !cancelPrev) {
if (getResultCollection() != null) { if (getResultCollection() != null) {
SearchResultCollection resCollection = SearchResultCollection resCollection =
getResultCollection().combineWithCollection(regionResultCollection, false, true); getResultCollection().combineWithCollection(regionResultCollection, true, true);
updateSearchResult(resCollection, true); updateSearchResult(resCollection, true);
} else { } else {
updateSearchResult(regionResultCollection, false); updateSearchResult(regionResultCollection, false);