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());
switch (pointType) {
case START:
targetPointsHelper.setStartPoint(ll, true, point.getPointDescription(mapActivity));
targetPointsHelper.setStartPoint(ll, true, point.getPointDescription(requireActivity()));
break;
case TARGET:
targetPointsHelper.navigateToPoint(ll, true, -1, point.getPointDescription(mapActivity));
targetPointsHelper.navigateToPoint(ll, true, -1, point.getPointDescription(requireActivity()));
break;
case INTERMEDIATE:
targetPointsHelper.navigateToPoint(ll, true, targetPointsHelper.getIntermediatePoints().size(), point.getPointDescription(mapActivity));
targetPointsHelper.navigateToPoint(ll, true, targetPointsHelper.getIntermediatePoints().size(), point.getPointDescription(requireActivity()));
break;
case HOME:
favorites.setSpecialPoint(ll, FavouritePoint.SpecialPointType.HOME, null);

View file

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