mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Add comments
This commit is contained in:
parent
b15faa9a35
commit
e2c8f30a95
1 changed files with 3 additions and 1 deletions
|
|
@ -224,9 +224,11 @@ public class CategorizationFragment extends Fragment {
|
||||||
//Needs to be an ArrayList and not a List unless we want to modify a big portion of preexisting code
|
//Needs to be an ArrayList and not a List unless we want to modify a big portion of preexisting code
|
||||||
ArrayList<String> mergedItemsList = new ArrayList<String>(mergedItems);
|
ArrayList<String> mergedItemsList = new ArrayList<String>(mergedItems);
|
||||||
|
|
||||||
|
//Copy to Iterator to prevent ConcurrentModificationException
|
||||||
for(Iterator<String> item = mergedItemsList.iterator(); item.hasNext();) {
|
for(Iterator<String> item = mergedItemsList.iterator(); item.hasNext();) {
|
||||||
String s = item.next();
|
String s = item.next();
|
||||||
|
|
||||||
|
//Check if s contains a 4-digit word anywhere within the string (.* is wildcard)
|
||||||
if(s.matches(".*\\d{4}.*")) {
|
if(s.matches(".*\\d{4}.*")) {
|
||||||
Log.d(TAG, "Filtering out year " + s);
|
Log.d(TAG, "Filtering out year " + s);
|
||||||
item.remove();
|
item.remove();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue