From 946741933c2764b086b0460b7db91cd170f9d7e0 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 3 Feb 2021 16:30:01 +0100 Subject: [PATCH] Update ipfs image --- .../mapcontextmenu/builders/cards/IPFSImageCard.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/IPFSImageCard.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/IPFSImageCard.java index 63f02d10fe..21cd6f7c73 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/IPFSImageCard.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/IPFSImageCard.java @@ -16,16 +16,16 @@ public class IPFSImageCard extends ImageCard { public IPFSImageCard(MapActivity mapActivity, JSONObject imageObject) { super(mapActivity, imageObject); - String cid = ""; + url = mapActivity.getString(R.string.opr_base_url) + "api/ipfs/image?"; try { - cid = (String) imageObject.get("cid"); + url += "cid=" + (String) imageObject.getString("cid"); + url += "&hash=" + (String) imageObject.getString("hash"); + url += "&ext=" + (String) imageObject.getString("extension"); } catch (JSONException e) { LOG.error(e); } - String BASE_URL = mapActivity.getString(R.string.opr_base_url) + "api/ipfs/image-ipfs?cid="; - url = BASE_URL + cid; - imageHiresUrl = BASE_URL + cid; - imageUrl = BASE_URL + cid; + imageHiresUrl = url; + imageUrl = url; icon = ContextCompat.getDrawable(getMyApplication(), R.drawable.ic_logo_openplacereview); if (!Algorithms.isEmpty(getUrl())) { View.OnClickListener onClickListener = new View.OnClickListener() {