From 13710dde063709eefafc59a8ac5705ed7f61150c Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 22 Jun 2023 11:49:49 -0400 Subject: [PATCH] No need to go into a Synchronized block to get a user object here. --- app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt b/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt index ce29c770f..57c556556 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt @@ -1222,8 +1222,7 @@ class Account( GlobalScope.launch(Dispatchers.IO) { it.cache.spamMessages.snapshot().values.forEach { if (it.pubkeyHex !in transientHiddenUsers && it.duplicatedMessages.size >= 5) { - val userToBlock = LocalCache.getOrCreateUser(it.pubkeyHex) - if (userToBlock != userProfile() && userToBlock.pubkeyHex !in followingKeySet()) { + if (it.pubkeyHex != userProfile().pubkeyHex && it.pubkeyHex !in followingKeySet()) { transientHiddenUsers = transientHiddenUsers + it.pubkeyHex live.invalidateData() }