mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Add regular expression and remove those items
This commit is contained in:
parent
59455697de
commit
1c3fd70cb3
1 changed files with 7 additions and 0 deletions
|
|
@ -218,6 +218,13 @@ public class CategorizationFragment extends Fragment {
|
||||||
mergedItems.addAll(recentItems);
|
mergedItems.addAll(recentItems);
|
||||||
Log.d(TAG, "Adding recent items: " + recentItems);
|
Log.d(TAG, "Adding recent items: " + recentItems);
|
||||||
|
|
||||||
|
for (String item : mergedItems) {
|
||||||
|
if (item.matches("(19|20)\\d{2}")) {
|
||||||
|
Log.d(TAG, "Filtering out year " + item);
|
||||||
|
mergedItems.remove(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//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);
|
||||||
Log.d(TAG, "Merged item list: " + mergedItemsList);
|
Log.d(TAG, "Merged item list: " + mergedItemsList);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue