Issue 792 completion

This commit is contained in:
sonora 2012-01-14 13:29:38 +01:00
parent 1db7cf6061
commit f48e19636d

View file

@ -200,11 +200,13 @@ public class FavouritesActivity extends ExpandableListActivity {
@Override @Override
public int compare(FavouritePoint object1, FavouritePoint object2) { public int compare(FavouritePoint object1, FavouritePoint object2) {
double d1 = MapUtils.getDistance(mapLocation, object1.getLatitude(), object1.getLongitude()); // double d1 = MapUtils.getDistance(mapLocation, object1.getLatitude(), object1.getLongitude());
double d2 = MapUtils.getDistance(mapLocation, object2.getLatitude(), object2.getLongitude()); // double d2 = MapUtils.getDistance(mapLocation, object2.getLatitude(), object2.getLongitude());
if(d1 == d2){ // if(d1 == d2){
if(object1.getName == object2.getName){
return 0; return 0;
} else if(d1 > d2){ // } else if(d1 > d2){
} else if(object1.getName > object1.getName){
return 1; return 1;
} }
return -1; return -1;