From 9c21b0508af399b5a5924b82cf45985c7c75b343 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 30 Oct 2023 21:00:37 +0100 Subject: code cleanup --- src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/main/java/at') 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) { -- cgit