mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
better variale name for ".*0s.*"
as that regex will match e.g. `1920s` and `80s` too, so the original `is20xxsYear` would be confusing name for it
This commit is contained in:
parent
eafb363863
commit
d92225a3a2
1 changed files with 3 additions and 3 deletions
|
|
@ -40,10 +40,10 @@ class CategoriesModel @Inject constructor(
|
|||
val prevYearInString = prevYear.toString()
|
||||
Timber.d("Previous year: %s", prevYearInString)
|
||||
|
||||
val is20xxsYear = item.matches(".*0s.*".toRegex())
|
||||
val mentionsDecade = item.matches(".*0s.*".toRegex())
|
||||
|
||||
if (is20xxsYear) {
|
||||
//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
|
||||
if (mentionsDecade) {
|
||||
//Check if the year in the form of XX(X)0s is relevant, i.e. in the 2000s or 2010s (or 2020s) as stated in Issue #1029
|
||||
// If not, check if it is an irrelevant category such as Media_needing_categories_as_of_16_June_2017(Issue #750)
|
||||
return !item.matches(".*20[0-2]0s.*".toRegex())
|
||||
|| item.matches("(.*)needing(.*)".toRegex())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue