diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java index 7a003e81d5..a316ffbf29 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java @@ -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() { + @Override + public int compare(QuickSearchListItem o1, QuickSearchListItem o2) { + return Double.compare(o1.getSearchResult().priority, o2.getSearchResult().priority); + } + }); } historySearchFragment.updateListAdapter(rows, false); } catch (Exception e) {