Clean up code
This commit is contained in:
parent
ccf249cc35
commit
2f464549b0
1 changed files with 7 additions and 6 deletions
|
@ -20,16 +20,17 @@ public class IPFSImageCard extends ImageCard {
|
||||||
|
|
||||||
public IPFSImageCard(MapActivity mapActivity, JSONObject imageObject) {
|
public IPFSImageCard(MapActivity mapActivity, JSONObject imageObject) {
|
||||||
super(mapActivity, imageObject);
|
super(mapActivity, imageObject);
|
||||||
url = mapActivity.getString(R.string.opr_base_url) + "api/ipfs/image?";
|
|
||||||
try {
|
try {
|
||||||
url += "cid=" + (String) imageObject.getString("cid");
|
String calcImageUrl = mapActivity.getString(R.string.opr_base_url) + "api/ipfs/image?";
|
||||||
url += "&hash=" + (String) imageObject.getString("hash");
|
calcImageUrl += "cid=" + (String) imageObject.getString("cid");
|
||||||
url += "&ext=" + (String) imageObject.getString("extension");
|
calcImageUrl += "&hash=" + (String) imageObject.getString("hash");
|
||||||
|
calcImageUrl += "&ext=" + (String) imageObject.getString("extension");
|
||||||
|
url = calcImageUrl;
|
||||||
|
imageHiresUrl = url;
|
||||||
|
imageUrl = url;
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
LOG.error(e);
|
LOG.error(e);
|
||||||
}
|
}
|
||||||
imageHiresUrl = url;
|
|
||||||
imageUrl = url;
|
|
||||||
icon = ContextCompat.getDrawable(getMyApplication(), R.drawable.ic_logo_openplacereview);
|
icon = ContextCompat.getDrawable(getMyApplication(), R.drawable.ic_logo_openplacereview);
|
||||||
if (!Algorithms.isEmpty(getUrl())) {
|
if (!Algorithms.isEmpty(getUrl())) {
|
||||||
View.OnClickListener onClickListener = new View.OnClickListener() {
|
View.OnClickListener onClickListener = new View.OnClickListener() {
|
||||||
|
|
Loading…
Reference in a new issue