Skip to content

Commit

Permalink
perf: preKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Feb 6, 2024
1 parent c871333 commit 02f6d07
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/src/main/kotlin/li/songe/gkd/data/ResolvedRule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ sealed class ResolvedRule(
) {
val key = rule.key
val index = group.rules.indexOf(rule)
val othersKeys = group.rules.filter { r -> r.key != rule.key }.mapNotNull { r -> r.key }.toSet()
val preKeys = (rule.preKeys ?: emptyList()).filter { r -> othersKeys.contains(r) }.toSet()
val preKeys = (rule.preKeys ?: emptyList()).toSet()
val resetMatch = rule.resetMatch ?: group.resetMatch
val matches = rule.matches.map { s -> Selector.parse(s) }
val excludeMatches = (rule.excludeMatches ?: emptyList()).map { s -> Selector.parse(s) }
Expand Down

0 comments on commit 02f6d07

Please sign in to comment.