aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-30 21:00:37 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-30 21:00:37 +0100
commit9c21b0508af399b5a5924b82cf45985c7c75b343 (patch)
tree54a090951386ed31b6e64accbb8f467df6da326b /src/main/java/at
parentd1afb19db4095fff56f1935b9d935b7297f13dff (diff)
downloadskyhanni-9c21b0508af399b5a5924b82cf45985c7c75b343.tar.gz
skyhanni-9c21b0508af399b5a5924b82cf45985c7c75b343.tar.bz2
skyhanni-9c21b0508af399b5a5924b82cf45985c7c75b343.zip
code cleanup
Diffstat (limited to 'src/main/java/at')
-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) {