From 1146dc2dea7e16311c9ce3cfad218f3c47d1ff76 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Thu, 9 Jan 2020 12:47:35 +0200 Subject: [PATCH] Fix local name in favorite point menu controller --- .../controllers/FavouritePointMenuController.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java index fb339a1c95..8ba255244f 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java @@ -129,6 +129,17 @@ public class FavouritePointMenuController extends MenuController { return mapMarker == null; } + @NonNull + @Override + public String getNameStr() { + MapActivity mapActivity = getMapActivity(); + if (mapActivity != null) { + return fav.getDisplayName(getMapActivity()); + } else { + return super.getNameStr(); + } + } + @Override public Drawable getSecondLineTypeIcon() { return getIcon(R.drawable.ic_action_group_name_16, isLight() ? R.color.icon_color_default_light : R.color.ctx_menu_bottom_view_icon_dark);