mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
remove() iterator again
This commit is contained in:
parent
b83999b9b1
commit
4c3ca2fd41
1 changed files with 5 additions and 2 deletions
|
|
@ -31,6 +31,8 @@ public class PrefixUpdater extends AsyncTask<Void, Void, ArrayList<String>> {
|
|||
private static final String TAG = PrefixUpdater.class.getName();
|
||||
private CategorizationFragment catFragment;
|
||||
|
||||
ArrayList<String> filteredItems = new ArrayList<> ();
|
||||
|
||||
public PrefixUpdater(CategorizationFragment catFragment) {
|
||||
this.catFragment = catFragment;
|
||||
}
|
||||
|
|
@ -56,10 +58,11 @@ public class PrefixUpdater extends AsyncTask<Void, Void, ArrayList<String>> {
|
|||
//Check if s contains a 4-digit word anywhere within the string (.* is wildcard)
|
||||
if(s.matches(".*(19|20)\\d{2}.*")) {
|
||||
Log.d(TAG, "Filtering out year " + s);
|
||||
items.remove(s);
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Log.d(TAG, "Items: " + items.toString());
|
||||
return items;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue