Skip to content

Commit 25c358b

Browse files
committed
Add pic parameter to place type
1 parent 86007e4 commit 25c358b

File tree

1 file changed

+6
-3
lines changed
  • app/src/main/java/fr/free/nrw/commons/nearby

1 file changed

+6
-3
lines changed

app/src/main/java/fr/free/nrw/commons/nearby/Place.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,19 @@ public class Place implements Parcelable {
2323
private final String longDescription;
2424
public final LatLng location;
2525
private final String category;
26+
public final String pic;
2627

2728
public String distance;
2829
public final Sitelinks siteLinks;
2930

3031

31-
public Place(String name, Label label, String longDescription, LatLng location, String category, Sitelinks siteLinks) {
32-
this.name = name;
32+
public Place(String name, Label label, String longDescription, LatLng location, String category, Sitelinks siteLinks, String pic) { this.name = name;
3333
this.label = label;
3434
this.longDescription = longDescription;
3535
this.location = location;
3636
this.category = category;
3737
this.siteLinks = siteLinks;
38+
this.pic = pic;
3839
}
3940

4041
public Place(Parcel in) {
@@ -44,6 +45,7 @@ public Place(Parcel in) {
4445
this.location = in.readParcelable(LatLng.class.getClassLoader());
4546
this.category = in.readString();
4647
this.siteLinks = in.readParcelable(Sitelinks.class.getClassLoader());
48+
this.pic = in.readString();
4749
}
4850

4951
public static Place from(NearbyResultItem item) {
@@ -62,7 +64,7 @@ public static Place from(NearbyResultItem item) {
6264
.setWikipediaLink(item.getWikipediaArticle().getValue())
6365
.setCommonsLink(item.getCommonsArticle().getValue())
6466
.setWikidataLink(item.getItem().getValue())
65-
.build());
67+
.build(), item.getPic().getValue());
6668
}
6769

6870
/**
@@ -173,6 +175,7 @@ public String toString() {
173175
", category='" + category + '\'' +
174176
", distance='" + distance + '\'' +
175177
", siteLinks='" + siteLinks.toString() + '\'' +
178+
", pic='" + pic + '\'' +
176179
'}';
177180
}
178181

0 commit comments

Comments
 (0)