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;
|
private final String longDescription;
|
||||||
public final LatLng location;
|
public final LatLng location;
|
||||||
private final String category;
|
private final String category;
|
||||||
|
public final String pic;
|
||||||
|
|
||||||
public String distance;
|
public String distance;
|
||||||
public final Sitelinks siteLinks;
|
public final Sitelinks siteLinks;
|
||||||
|
|
||||||
|
|
||||||
public Place(String name, Label label, String longDescription, LatLng location, String category, Sitelinks siteLinks) {
|
public Place(String name, Label label, String longDescription, LatLng location, String category, Sitelinks siteLinks, String pic) { this.name = name;
|
||||||
this.name = name;
|
|
||||||
this.label = label;
|
this.label = label;
|
||||||
this.longDescription = longDescription;
|
this.longDescription = longDescription;
|
||||||
this.location = location;
|
this.location = location;
|
||||||
this.category = category;
|
this.category = category;
|
||||||
this.siteLinks = siteLinks;
|
this.siteLinks = siteLinks;
|
||||||
|
this.pic = pic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Place(Parcel in) {
|
public Place(Parcel in) {
|
||||||
|
|
@ -44,6 +45,7 @@ public class Place implements Parcelable {
|
||||||
this.location = in.readParcelable(LatLng.class.getClassLoader());
|
this.location = in.readParcelable(LatLng.class.getClassLoader());
|
||||||
this.category = in.readString();
|
this.category = in.readString();
|
||||||
this.siteLinks = in.readParcelable(Sitelinks.class.getClassLoader());
|
this.siteLinks = in.readParcelable(Sitelinks.class.getClassLoader());
|
||||||
|
this.pic = in.readString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Place from(NearbyResultItem item) {
|
public static Place from(NearbyResultItem item) {
|
||||||
|
|
@ -62,7 +64,7 @@ public class Place implements Parcelable {
|
||||||
.setWikipediaLink(item.getWikipediaArticle().getValue())
|
.setWikipediaLink(item.getWikipediaArticle().getValue())
|
||||||
.setCommonsLink(item.getCommonsArticle().getValue())
|
.setCommonsLink(item.getCommonsArticle().getValue())
|
||||||
.setWikidataLink(item.getItem().getValue())
|
.setWikidataLink(item.getItem().getValue())
|
||||||
.build());
|
.build(), item.getPic().getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -173,6 +175,7 @@ public class Place implements Parcelable {
|
||||||
", category='" + category + '\'' +
|
", category='" + category + '\'' +
|
||||||
", distance='" + distance + '\'' +
|
", distance='" + distance + '\'' +
|
||||||
", siteLinks='" + siteLinks.toString() + '\'' +
|
", siteLinks='" + siteLinks.toString() + '\'' +
|
||||||
|
", pic='" + pic + '\'' +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue