From 1d2d5350abf6f6ca16a52650b192e3378d3986f8 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 3 Feb 2021 18:37:57 +0200 Subject: [PATCH] Fix opr card update --- .../openplacereviews/OpenPlaceReviewsPlugin.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/openplacereviews/OpenPlaceReviewsPlugin.java b/OsmAnd/src/net/osmand/plus/openplacereviews/OpenPlaceReviewsPlugin.java index 861b9ec971..d1ddaa0eac 100644 --- a/OsmAnd/src/net/osmand/plus/openplacereviews/OpenPlaceReviewsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/openplacereviews/OpenPlaceReviewsPlugin.java @@ -88,8 +88,8 @@ public class OpenPlaceReviewsPlugin extends OsmandPlugin { @Override protected List getContextMenuImageCards(@NonNull Map params, - @Nullable Map additionalParams, - @Nullable GetImageCardsListener listener) { + @Nullable Map additionalParams, + @Nullable GetImageCardsListener listener) { List imageCards = new ArrayList<>(); if (mapActivity != null) { Object object = mapActivity.getMapLayers().getContextMenuLayer().getSelectedObject(); @@ -111,6 +111,15 @@ public class OpenPlaceReviewsPlugin extends OsmandPlugin { return imageCards; } + @Override + protected ImageCard createContextMenuImageCard(@NonNull JSONObject imageObject) { + ImageCard imageCard = null; + if (mapActivity != null && imageObject != JSONObject.NULL) { + imageCard = createCardOpr(mapActivity, imageObject); + } + return imageCard; + } + private void getPicturesForPlace(List result, String response) { try { if (!Algorithms.isEmpty(response)) {