aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
index d0a669519..33509b606 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
@@ -416,12 +416,10 @@ class ChatFilter {
* @see messagesContainsMap
* @see messagesStartsWithMap
*/
- private fun String.isPresent(key: String): Boolean {
- return this in (messagesMap[key] ?: emptyList()) ||
+ private fun String.isPresent(key: String) = this in (messagesMap[key] ?: emptyList()) ||
(patternsMap[key] ?: emptyList()).any { it.matchMatcher(this) { } != null } ||
(messagesContainsMap[key] ?: emptyList()).any { this.contains(it) } ||
(messagesStartsWithMap[key] ?: emptyList()).any { this.startsWith(it) }
- }
@SubscribeEvent
fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {