sort favs after import

This commit is contained in:
sonora 2016-02-26 02:21:54 +01:00
parent 13cfa0c60c
commit 436a88b27a
2 changed files with 2 additions and 1 deletions

View file

@ -483,7 +483,7 @@ public class FavouritesDbHelper {
cachedFavoritePoints = temp; cachedFavoritePoints = temp;
} }
private void sortAll() { public void sortAll() {
final Collator collator = Collator.getInstance(); final Collator collator = Collator.getInstance();
collator.setStrength(Collator.SECONDARY); collator.setStrength(Collator.SECONDARY);
Collections.sort(favoriteGroups, new Comparator<FavoriteGroup>() { Collections.sort(favoriteGroups, new Comparator<FavoriteGroup>() {

View file

@ -182,6 +182,7 @@ public class GpxImportHelper {
favoritesHelper.deleteFavourite(favourite, false); favoritesHelper.deleteFavourite(favourite, false);
favoritesHelper.addFavourite(favourite, false); favoritesHelper.addFavourite(favourite, false);
} }
favoritesHelper.sortAll();
favoritesHelper.saveCurrentPointsIntoFile(); favoritesHelper.saveCurrentPointsIntoFile();
return null; return null;
} }