mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Stripped strings before adding to Set
Instead of doing it after
This commit is contained in:
parent
d7bc231093
commit
37e76461fa
1 changed files with 4 additions and 5 deletions
|
|
@ -28,7 +28,6 @@ public class MwVolleyApi {
|
|||
private Context context;
|
||||
|
||||
protected static HashSet<String> categorySet;
|
||||
protected static String categorySetString;
|
||||
|
||||
public MwVolleyApi(Context context) {
|
||||
this.context = context;
|
||||
|
|
@ -142,9 +141,8 @@ public class MwVolleyApi {
|
|||
return "No collection of categories";
|
||||
}
|
||||
else {
|
||||
categorySetString = categorySet.toString();
|
||||
categorySetString = categorySetString.replace("Category:", "");
|
||||
return "CATEGORIES FOUND" + categorySetString;
|
||||
|
||||
return "CATEGORIES FOUND" + categorySet.toString();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
|
|
@ -190,7 +188,8 @@ public class MwVolleyApi {
|
|||
builder.append(category.toString());
|
||||
builder.append("\n");
|
||||
if (category != null) {
|
||||
categorySet.add(category.toString());
|
||||
String categoryString = category.toString().replace("Category:", "");
|
||||
categorySet.add(categoryString);
|
||||
//Log.d("Set", "category added: " + category.toString());
|
||||
//Log.d("Set", "Current category Set" + categorySet.toString());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue