This commit is contained in:
Vitaliy 2020-05-12 21:02:58 +03:00
parent b2181170d0
commit d107cc6e25

View file

@ -109,6 +109,8 @@ import net.osmand.util.MapUtils;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList;
@ -1513,6 +1515,12 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
for (SearchResult sr : res.getCurrentSearchResults()) {
rows.add(new QuickSearchListItem(app, sr));
}
Collections.sort(rows, new Comparator<QuickSearchListItem>() {
@Override
public int compare(QuickSearchListItem o1, QuickSearchListItem o2) {
return Double.compare(o1.getSearchResult().priority, o2.getSearchResult().priority);
}
});
}
historySearchFragment.updateListAdapter(rows, false);
} catch (Exception e) {