Fix opr card update

This commit is contained in:
Vitaliy 2021-02-03 18:37:57 +02:00
parent f1cff27d62
commit 1d2d5350ab

View file

@ -88,8 +88,8 @@ public class OpenPlaceReviewsPlugin extends OsmandPlugin {
@Override @Override
protected List<ImageCard> getContextMenuImageCards(@NonNull Map<String, String> params, protected List<ImageCard> getContextMenuImageCards(@NonNull Map<String, String> params,
@Nullable Map<String, String> additionalParams, @Nullable Map<String, String> additionalParams,
@Nullable GetImageCardsListener listener) { @Nullable GetImageCardsListener listener) {
List<ImageCard> imageCards = new ArrayList<>(); List<ImageCard> imageCards = new ArrayList<>();
if (mapActivity != null) { if (mapActivity != null) {
Object object = mapActivity.getMapLayers().getContextMenuLayer().getSelectedObject(); Object object = mapActivity.getMapLayers().getContextMenuLayer().getSelectedObject();
@ -111,6 +111,15 @@ public class OpenPlaceReviewsPlugin extends OsmandPlugin {
return imageCards; 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<ImageCard> result, String response) { private void getPicturesForPlace(List<ImageCard> result, String response) {
try { try {
if (!Algorithms.isEmpty(response)) { if (!Algorithms.isEmpty(response)) {