From d73cbc3eb884f21a632d38ccf52fba39f797807e Mon Sep 17 00:00:00 2001 From: misaochan Date: Fri, 25 Dec 2015 19:06:05 +1300 Subject: [PATCH] Checks for whether any nearby categories found --- .../java/fr/free/nrw/commons/upload/MwVolleyApi.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/commons/src/main/java/fr/free/nrw/commons/upload/MwVolleyApi.java b/commons/src/main/java/fr/free/nrw/commons/upload/MwVolleyApi.java index 7c55e1f57..1f4f0cb5f 100644 --- a/commons/src/main/java/fr/free/nrw/commons/upload/MwVolleyApi.java +++ b/commons/src/main/java/fr/free/nrw/commons/upload/MwVolleyApi.java @@ -30,6 +30,8 @@ public class MwVolleyApi { private Context context; protected static HashSet 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 getCategoriesGps() { + public ArrayList getGpsCat() { ArrayList list = new ArrayList(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(); } }