Add getters for name and description of Place

This commit is contained in:
misaochan 2017-12-31 00:36:51 +10:00
parent c70eec650c
commit 1fe7b4842d
2 changed files with 9 additions and 2 deletions

View file

@ -40,6 +40,7 @@ import java.util.List;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.utils.UriDeserializer;
import timber.log.Timber;
public class NearbyMapFragment extends android.support.v4.app.Fragment {
@ -416,10 +417,12 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
title.setText(place.name.toString());
distance.setText(place.distance.toString());
Timber.d("Image title: " + place.getName() + "Image desc: " + place.getLongDescription());
fabCamera.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//TODO: Change this to activate camera upload
//TODO: Change this to activate camera upload (see ContributionsListFragment)
openWebView(place.siteLinks.getWikidataLink());
}
});
@ -427,7 +430,7 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
fabGallery.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//TODO: Change this to activate gallery upload
//TODO: Change this to activate gallery upload (see ContributionsListFragment)
openWebView(place.siteLinks.getWikidataLink());
}
});

View file

@ -34,10 +34,14 @@ public class Place {
this.siteLinks = siteLinks;
}
public String getName() { return name; }
public Description getDescription() {
return description;
}
public String getLongDescription() { return longDescription; }
public void setDistance(String distance) {
this.distance = distance;
}