From 4651074774df0b610b4bac9cd47bb7f82a19db78 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 18 Nov 2024 16:48:21 -0500 Subject: [PATCH] Fixes bug on searching for geohashes on addresses --- .../java/com/vitorpamplona/amethyst/model/User.kt | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/User.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/User.kt index 89edeeac7..d531d0063 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/User.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/User.kt @@ -339,19 +339,9 @@ class User( fun isFollowing(user: User): Boolean = latestContactList?.isTaggedUser(user.pubkeyHex) ?: false - fun isFollowingHashtag(tag: String): Boolean { - return latestContactList?.unverifiedFollowTagSet()?.map { it.lowercase() }?.toSet()?.let { - return tag.lowercase() in it - } - ?: false - } + fun isFollowingHashtag(tag: String) = latestContactList?.isTaggedHash(tag) ?: false - fun isFollowingGeohash(geoTag: String): Boolean { - return latestContactList?.unverifiedFollowAddressSet()?.toSet()?.let { - return geoTag.lowercase() in it - } - ?: false - } + fun isFollowingGeohash(geoTag: String) = latestContactList?.isTaggedGeoHash(geoTag) ?: false fun transientFollowCount(): Int? = latestContactList?.unverifiedFollowKeySet()?.size