From c7861dfac44a58a8b5d574f1c4eb42d10649df4c Mon Sep 17 00:00:00 2001 From: David Kaspar Date: Mon, 9 Oct 2023 13:53:09 +0200 Subject: [PATCH] change mute test to equality with string including event 30000 and user hex --- .../amethyst/ui/dal/HomeConversationsFeedFilter.kt | 4 +--- .../vitorpamplona/amethyst/ui/dal/HomeNewThreadFeedFilter.kt | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/HomeConversationsFeedFilter.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/HomeConversationsFeedFilter.kt index 756733bf5..5a5a94185 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/HomeConversationsFeedFilter.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/HomeConversationsFeedFilter.kt @@ -13,14 +13,12 @@ import com.vitorpamplona.quartz.utils.TimeUtils class HomeConversationsFeedFilter(val account: Account) : AdditiveFeedFilter() { - private val regex = ("30000:[a-f0-9]+:" + PeopleListEvent.blockList).toRegex(RegexOption.IGNORE_CASE) - override fun feedKey(): String { return account.userProfile().pubkeyHex + "-" + account.defaultHomeFollowList } override fun showHiddenKey(): Boolean { - return regex.matches(account.defaultHomeFollowList) + return account.defaultHomeFollowList == "30000:${account.userProfile().pubkeyHex}:${PeopleListEvent.blockList}" } override fun feed(): List { diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/HomeNewThreadFeedFilter.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/HomeNewThreadFeedFilter.kt index 2dab0008b..44e6dbbdd 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/HomeNewThreadFeedFilter.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/HomeNewThreadFeedFilter.kt @@ -18,14 +18,12 @@ import com.vitorpamplona.quartz.utils.TimeUtils class HomeNewThreadFeedFilter(val account: Account) : AdditiveFeedFilter() { - private val regex = ("30000:[a-f0-9]+:" + PeopleListEvent.blockList).toRegex(RegexOption.IGNORE_CASE) - override fun feedKey(): String { return account.userProfile().pubkeyHex + "-" + account.defaultHomeFollowList } override fun showHiddenKey(): Boolean { - return regex.matches(account.defaultHomeFollowList) + return account.defaultHomeFollowList == "30000:${account.userProfile().pubkeyHex}:${PeopleListEvent.blockList}" } override fun feed(): List {