mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 13:23:58 +01:00
return is simple now, so we can get rid of extra val oldDecade
This commit is contained in:
parent
e3c1923036
commit
c545642e96
1 changed files with 1 additions and 2 deletions
|
|
@ -42,7 +42,6 @@ class CategoriesModel @Inject constructor(
|
||||||
|
|
||||||
val mentionsDecade = item.matches(".*0s.*".toRegex())
|
val mentionsDecade = item.matches(".*0s.*".toRegex())
|
||||||
val recentDecade = item.matches(".*20[0-2]0s.*".toRegex())
|
val recentDecade = item.matches(".*20[0-2]0s.*".toRegex())
|
||||||
val oldDecade = !recentDecade
|
|
||||||
val spammyCategory = item.matches("(.*)needing(.*)".toRegex())
|
val spammyCategory = item.matches("(.*)needing(.*)".toRegex())
|
||||||
|| item.matches("(.*)taken on(.*)".toRegex())
|
|| item.matches("(.*)taken on(.*)".toRegex())
|
||||||
|
|
||||||
|
|
@ -53,7 +52,7 @@ class CategoriesModel @Inject constructor(
|
||||||
|
|
||||||
if (mentionsDecade) {
|
if (mentionsDecade) {
|
||||||
//Check if the year in the form of XX(X)0s is recent/relevant, i.e. in the 2000s or 2010s/2020s as stated in Issue #1029
|
//Check if the year in the form of XX(X)0s is recent/relevant, i.e. in the 2000s or 2010s/2020s as stated in Issue #1029
|
||||||
return oldDecade
|
return !recentDecade
|
||||||
} else {
|
} else {
|
||||||
// If it is not an year in 20xxs form, then check if item contains a 4-digit word
|
// If it is not an year in 20xxs form, then check if item contains a 4-digit word
|
||||||
// anywhere within the string (.* is wildcard) (Issue #47)
|
// anywhere within the string (.* is wildcard) (Issue #47)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue