mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Change 'attractions' to 'places'
This commit is contained in:
parent
c9a38819f0
commit
b13b5c690a
1 changed files with 6 additions and 6 deletions
|
|
@ -12,15 +12,15 @@ import java.util.List;
|
||||||
|
|
||||||
public class NearbyPlaces {
|
public class NearbyPlaces {
|
||||||
|
|
||||||
static List<Place> attractions = null;
|
static List<Place> places = null;
|
||||||
|
|
||||||
public static synchronized List<Place> get() {
|
public static synchronized List<Place> get() {
|
||||||
if(attractions != null) {
|
if(places != null) {
|
||||||
return attractions;
|
return places;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
attractions = new ArrayList<Place>();
|
places = new ArrayList<Place>();
|
||||||
// TODO Load in a different thread and show wait dialog
|
// TODO Load in a different thread and show wait dialog
|
||||||
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
|
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
|
||||||
StrictMode.setThreadPolicy(policy);
|
StrictMode.setThreadPolicy(policy);
|
||||||
|
|
@ -74,7 +74,7 @@ public class NearbyPlaces {
|
||||||
image = "https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Point_d_interrogation.jpg/120px-Point_d_interrogation.jpg";
|
image = "https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Point_d_interrogation.jpg/120px-Point_d_interrogation.jpg";
|
||||||
}
|
}
|
||||||
|
|
||||||
attractions.add(new Attraction(
|
places.add(new Attraction(
|
||||||
name,
|
name,
|
||||||
type, // list
|
type, // list
|
||||||
type, // details
|
type, // details
|
||||||
|
|
@ -90,7 +90,7 @@ public class NearbyPlaces {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return attractions;
|
return places;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue