From 436a88b27abbff4a508135975188d7f274243443 Mon Sep 17 00:00:00 2001 From: sonora Date: Fri, 26 Feb 2016 02:21:54 +0100 Subject: [PATCH] sort favs after import --- OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java | 2 +- OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java index c30df1a413..15464a83dd 100644 --- a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java +++ b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java @@ -483,7 +483,7 @@ public class FavouritesDbHelper { cachedFavoritePoints = temp; } - private void sortAll() { + public void sortAll() { final Collator collator = Collator.getInstance(); collator.setStrength(Collator.SECONDARY); Collections.sort(favoriteGroups, new Comparator() { diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java index 6dc0561ed8..57319c7ab9 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java @@ -182,6 +182,7 @@ public class GpxImportHelper { favoritesHelper.deleteFavourite(favourite, false); favoritesHelper.addFavourite(favourite, false); } + favoritesHelper.sortAll(); favoritesHelper.saveCurrentPointsIntoFile(); return null; }