mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
added relevant filtering to containsYear method of CategorizationFragment.java
This commit is contained in:
parent
5838483bfd
commit
68fb5ee1ac
1 changed files with 3 additions and 1 deletions
|
|
@ -298,8 +298,10 @@ public class CategorizationFragment extends CommonsDaggerSupportFragment {
|
||||||
//Check if item contains a 4-digit word anywhere within the string (.* is wildcard)
|
//Check if item contains a 4-digit word anywhere within the string (.* is wildcard)
|
||||||
//And that item does not equal the current year or previous year
|
//And that item does not equal the current year or previous year
|
||||||
//And if it is an irrelevant category such as Media_needing_categories_as_of_16_June_2017(Issue #750)
|
//And if it is an irrelevant category such as Media_needing_categories_as_of_16_June_2017(Issue #750)
|
||||||
|
//Check if the year in the form of XX(X)0s is relevant, i.e. in the 2000s or 2010s as stated in Issue #1029
|
||||||
return ((item.matches(".*(19|20)\\d{2}.*") && !item.contains(yearInString) && !item.contains(prevYearInString))
|
return ((item.matches(".*(19|20)\\d{2}.*") && !item.contains(yearInString) && !item.contains(prevYearInString))
|
||||||
|| item.matches("(.*)needing(.*)") || item.matches("(.*)taken on(.*)"));
|
|| item.matches("(.*)needing(.*)") || item.matches("(.*)taken on(.*)")
|
||||||
|
|| (item.matches(".*0s.*") && !item.matches(".*(200|201)0s.*")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateCategoryCount(CategoryItem item) {
|
private void updateCategoryCount(CategoryItem item) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue