Issue 792 completion
This commit is contained in:
parent
1db7cf6061
commit
f48e19636d
1 changed files with 6 additions and 4 deletions
|
@ -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 > object1.getName){
|
||||
return 1;
|
||||
}
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue