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
protected List<ImageCard> getContextMenuImageCards(@NonNull Map<String, String> params,
@Nullable Map<String, String> additionalParams,
@Nullable GetImageCardsListener listener) {
@Nullable Map<String, String> additionalParams,
@Nullable GetImageCardsListener listener) {
List<ImageCard> 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<ImageCard> result, String response) {
try {
if (!Algorithms.isEmpty(response)) {