consolidate a few lines
This commit is contained in:
parent
80f48f106e
commit
43efb357db
1 changed files with 4 additions and 6 deletions
|
@ -175,15 +175,13 @@ public class DashFavoritesFragment extends DashBaseFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateLocation(Location location) {
|
public void updateLocation(Location location) {
|
||||||
//if (location == null) {
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
this.location = location;
|
//this.location = location;
|
||||||
loc = new LatLon(location.getLatitude(), location.getLongitude());
|
loc = new LatLon(location.getLatitude(), location.getLongitude());
|
||||||
}
|
} else if (getMyApplication().getSettings().getLastKnownMapLocation() != null) {
|
||||||
if (loc == null) {
|
|
||||||
loc = getMyApplication().getSettings().getLastKnownMapLocation();
|
loc = getMyApplication().getSettings().getLastKnownMapLocation();
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
this.loc = loc;
|
this.loc = loc;
|
||||||
updateArrows();
|
updateArrows();
|
||||||
|
|
Loading…
Reference in a new issue