Skip to content

Commit

Permalink
Simplify filtering allowed and known ViewModel factory functions
Browse files Browse the repository at this point in the history
  • Loading branch information
WhosNickDoglio committed Feb 15, 2023
1 parent 2febb3f commit 9419761
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ constructor(private val allowedNames: StringSetLintOption = StringSetLintOption(
property
.findDirectChildrenByClass<KtCallExpression>()
.filter {
KnownViewModelFactories.contains(it.calleeExpression?.text) ||
allowedNames.value.contains(it.calleeExpression?.text)
val allFactoryNames = KnownViewModelFactories + allowedNames.value
it.calleeExpression?.text in allFactoryNames
}
.map { property to it.calleeExpression!!.text }
}
Expand Down

0 comments on commit 9419761

Please sign in to comment.