damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 88aa713729b890a129940585e1455e5bffa40e21
parent be1c03ad0effee0d0053e162de2b02c0baf84748
Author: gladiusKatana <garthsnyder@protonmail.com>
Date:   Wed,  8 Mar 2023 16:12:56 -0500

Fix json appearing in profile searches

Changelog-Fixed: Fix json appearing in profile searches
Closes: #757
Fixes: #748

Diffstat:
Mdamus/Views/Search/SearchingEventView.swift | 27++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/damus/Views/Search/SearchingEventView.swift b/damus/Views/Search/SearchingEventView.swift @@ -75,22 +75,23 @@ struct SearchingEventView: View { self.search_state = .found(ev) return } - case .profile: - if state.profiles.lookup(id: evid) != nil { - self.search_state = .found_profile(evid) - return + find_event(state: state, evid: evid, search_type: search_type, find_from: nil) { ev in + if let ev { + self.search_state = .found(ev) + } else { + self.search_state = .not_found + } } - } - - find_event(state: state, evid: evid, search_type: search_type, find_from: nil) { ev in - - if let ev { - self.search_state = .found(ev) - } else { - self.search_state = .not_found + case .profile: + find_event(state: state, evid: evid, search_type: search_type, find_from: nil) { _ in + if state.profiles.lookup(id: evid) != nil { + self.search_state = .found_profile(evid) + return + } else { + self.search_state = .not_found + } } } - } } }