mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +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;
|
||||
|
||||
protected static HashSet<String> categorySet;
|
||||
//To check later on whether any nearby categories were found
|
||||
public static boolean gpsCatExists;
|
||||
|
||||
public MwVolleyApi(Context context) {
|
||||
this.context = context;
|
||||
|
|
@ -37,7 +39,7 @@ public class MwVolleyApi {
|
|||
}
|
||||
|
||||
//To get the list of categories for display
|
||||
public ArrayList<String> getCategoriesGps() {
|
||||
public ArrayList<String> getGpsCat() {
|
||||
ArrayList<String> list = new ArrayList<String>(categorySet);
|
||||
return list;
|
||||
}
|
||||
|
|
@ -147,10 +149,13 @@ public class MwVolleyApi {
|
|||
|
||||
private String printSet() {
|
||||
if (categorySet == null || categorySet.isEmpty()) {
|
||||
gpsCatExists = false;
|
||||
Log.d("Cat", "gpsCatExists=" + gpsCatExists);
|
||||
return "No collection of categories";
|
||||
}
|
||||
else {
|
||||
|
||||
gpsCatExists = true;
|
||||
Log.d("Cat", "gpsCatExists=" + gpsCatExists);
|
||||
return "CATEGORIES FOUND" + categorySet.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue