Issue 792 completion

This commit is contained in:
sonora 2012-01-14 14:00:59 +01:00
parent d007865cc1
commit fa422d474c

View file

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