Fix UI bug with user search and fix race conditions on profiles NIP-05 cache
Signed-off-by: Terry Yiu <git@tyiu.xyz> Reviewed-by: William Casarin <jb55@jb55.com> Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -194,7 +194,6 @@ func search_profiles(profiles: Profiles, search: String) -> [SearchedUser] {
|
||||
let matched_pubkeys = profiles.user_search_cache.search(key: new)
|
||||
|
||||
return matched_pubkeys
|
||||
.map { ($0, profiles.lookup(id: $0)) }
|
||||
.filter { $1 != nil }
|
||||
.map { SearchedUser(profile: $1, pubkey: $0) }
|
||||
.map { SearchedUser(profile: profiles.lookup(id: $0), pubkey: $0) }
|
||||
.filter { $0.profile != nil }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user