Fix local name in favorite point menu controller

This commit is contained in:
Dima-1 2020-01-09 19:06:04 +02:00
parent 91eb10347e
commit 50192251bb
2 changed files with 4 additions and 4 deletions

View file

@ -152,13 +152,13 @@ public class FavouritesBottomSheetMenuFragment extends MenuBottomSheetDialogFrag
LatLon ll = new LatLon(point.getLatitude(), point.getLongitude()); LatLon ll = new LatLon(point.getLatitude(), point.getLongitude());
switch (pointType) { switch (pointType) {
case START: case START:
targetPointsHelper.setStartPoint(ll, true, point.getPointDescription(mapActivity)); targetPointsHelper.setStartPoint(ll, true, point.getPointDescription(requireActivity()));
break; break;
case TARGET: case TARGET:
targetPointsHelper.navigateToPoint(ll, true, -1, point.getPointDescription(mapActivity)); targetPointsHelper.navigateToPoint(ll, true, -1, point.getPointDescription(requireActivity()));
break; break;
case INTERMEDIATE: case INTERMEDIATE:
targetPointsHelper.navigateToPoint(ll, true, targetPointsHelper.getIntermediatePoints().size(), point.getPointDescription(mapActivity)); targetPointsHelper.navigateToPoint(ll, true, targetPointsHelper.getIntermediatePoints().size(), point.getPointDescription(requireActivity()));
break; break;
case HOME: case HOME:
favorites.setSpecialPoint(ll, FavouritePoint.SpecialPointType.HOME, null); favorites.setSpecialPoint(ll, FavouritePoint.SpecialPointType.HOME, null);

View file

@ -474,7 +474,7 @@ public class AddPointBottomSheetDialog extends MenuBottomSheetDialogFragment {
if (item instanceof FavouritePoint) { if (item instanceof FavouritePoint) {
FavouritePoint point = (FavouritePoint) item; FavouritePoint point = (FavouritePoint) item;
ll = new LatLon(point.getLatitude(), point.getLongitude()); ll = new LatLon(point.getLatitude(), point.getLongitude());
name = point.getPointDescription(mapActivity); name = point.getPointDescription(requireActivity());
} else if (item instanceof PointType) { } else if (item instanceof PointType) {
MapActivity mapActivity = (MapActivity) getActivity(); MapActivity mapActivity = (MapActivity) getActivity();
if (mapActivity != null) { if (mapActivity != null) {