mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Checks for whether any nearby categories found
This commit is contained in:
parent
7c40e74f25
commit
d73cbc3eb8
1 changed files with 7 additions and 2 deletions
|
|
@ -30,6 +30,8 @@ public class MwVolleyApi {
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
||||||
protected static HashSet<String> categorySet;
|
protected static HashSet<String> categorySet;
|
||||||
|
//To check later on whether any nearby categories were found
|
||||||
|
public static boolean gpsCatExists;
|
||||||
|
|
||||||
public MwVolleyApi(Context context) {
|
public MwVolleyApi(Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
|
|
@ -37,7 +39,7 @@ public class MwVolleyApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
//To get the list of categories for display
|
//To get the list of categories for display
|
||||||
public ArrayList<String> getCategoriesGps() {
|
public ArrayList<String> getGpsCat() {
|
||||||
ArrayList<String> list = new ArrayList<String>(categorySet);
|
ArrayList<String> list = new ArrayList<String>(categorySet);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
@ -147,10 +149,13 @@ public class MwVolleyApi {
|
||||||
|
|
||||||
private String printSet() {
|
private String printSet() {
|
||||||
if (categorySet == null || categorySet.isEmpty()) {
|
if (categorySet == null || categorySet.isEmpty()) {
|
||||||
|
gpsCatExists = false;
|
||||||
|
Log.d("Cat", "gpsCatExists=" + gpsCatExists);
|
||||||
return "No collection of categories";
|
return "No collection of categories";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
gpsCatExists = true;
|
||||||
|
Log.d("Cat", "gpsCatExists=" + gpsCatExists);
|
||||||
return "CATEGORIES FOUND" + categorySet.toString();
|
return "CATEGORIES FOUND" + categorySet.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue