Hide extra description and remove unnecessary changes

This commit is contained in:
Vitaliy 2020-09-22 16:55:01 +03:00
parent a5610b7352
commit 5acf6e27f7
2 changed files with 8 additions and 5 deletions

View file

@ -525,9 +525,7 @@ public class MapActivityActions implements DialogProvider {
TargetPointsHelper tg = mapActivity.getMyApplication().getTargetPointsHelper();
tg.clearStartPoint(false);
Location finishLoc = ps.get(ps.size() - 1);
PointDescription point = new PointDescription(PointDescription.POINT_TYPE_LOCATION, result.path, "");
point.setName(PointDescription.getSearchAddressStr(mapActivity));
tg.navigateToPoint(new LatLon(finishLoc.getLatitude(), finishLoc.getLongitude()), false, -1, point);
tg.navigateToPoint(new LatLon(finishLoc.getLatitude(), finishLoc.getLongitude()), false, -1);
}
}
}

View file

@ -1760,8 +1760,13 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
if (routeParams != null) {
TargetPoint target = app.getTargetPointsHelper().getPointToNavigate();
if (target != null) {
PointDescription pointDescription = target.getOriginalPointDescription();
return pointDescription != null && routeParams.getFile().path.equals(pointDescription.getTypeName());
List<Location> points = routeParams.getPoints(app);
if (!Algorithms.isEmpty(points)) {
Location loc = points.get(points.size() - 1);
LatLon latLon = new LatLon(loc.getLatitude(), loc.getLongitude());
LatLon targetLatLon = new LatLon(target.getLatitude(), target.getLongitude());
return latLon.equals(targetLatLon);
}
}
}
}