mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Add pic parameter to place type
This commit is contained in:
parent
86007e4bb6
commit
25c358b67f
1 changed files with 6 additions and 3 deletions
|
|
@ -23,18 +23,19 @@ public class Place implements Parcelable {
|
|||
private final String longDescription;
|
||||
public final LatLng location;
|
||||
private final String category;
|
||||
public final String pic;
|
||||
|
||||
public String distance;
|
||||
public final Sitelinks siteLinks;
|
||||
|
||||
|
||||
public Place(String name, Label label, String longDescription, LatLng location, String category, Sitelinks siteLinks) {
|
||||
this.name = name;
|
||||
public Place(String name, Label label, String longDescription, LatLng location, String category, Sitelinks siteLinks, String pic) { this.name = name;
|
||||
this.label = label;
|
||||
this.longDescription = longDescription;
|
||||
this.location = location;
|
||||
this.category = category;
|
||||
this.siteLinks = siteLinks;
|
||||
this.pic = pic;
|
||||
}
|
||||
|
||||
public Place(Parcel in) {
|
||||
|
|
@ -44,6 +45,7 @@ public class Place implements Parcelable {
|
|||
this.location = in.readParcelable(LatLng.class.getClassLoader());
|
||||
this.category = in.readString();
|
||||
this.siteLinks = in.readParcelable(Sitelinks.class.getClassLoader());
|
||||
this.pic = in.readString();
|
||||
}
|
||||
|
||||
public static Place from(NearbyResultItem item) {
|
||||
|
|
@ -62,7 +64,7 @@ public class Place implements Parcelable {
|
|||
.setWikipediaLink(item.getWikipediaArticle().getValue())
|
||||
.setCommonsLink(item.getCommonsArticle().getValue())
|
||||
.setWikidataLink(item.getItem().getValue())
|
||||
.build());
|
||||
.build(), item.getPic().getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -173,6 +175,7 @@ public class Place implements Parcelable {
|
|||
", category='" + category + '\'' +
|
||||
", distance='" + distance + '\'' +
|
||||
", siteLinks='" + siteLinks.toString() + '\'' +
|
||||
", pic='" + pic + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue