damus

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

commit 510926fa707f67e65452aa9530214d5aec9fa1ff
parent 445e44cd1e77ba1719cdb7e20433262a6b273d19
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 11 Apr 2022 14:15:02 -0700

mute bestofhn events while testing

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mdamus/ContentView.swift | 12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/damus/ContentView.swift b/damus/ContentView.swift @@ -165,7 +165,9 @@ struct ContentView: View { last_event_of_kind[ev.kind] = ev } if ev.kind == 1 { - self.events.append(ev) + if !should_hide_event(ev) { + self.events.append(ev) + } self.events = self.events.sorted { $0.created_at > $1.created_at } } else if ev.kind == 0 { handle_metadata_event(ev) @@ -178,6 +180,14 @@ struct ContentView: View { } } } + + func should_hide_event(_ ev: NostrEvent) -> Bool { + // TODO: implement mute + if ev.pubkey == "887645fef0ce0c3c1218d2f5d8e6132a19304cdc57cd20281d082f38cfea0072" { + return true + } + return false + } } struct ContentView_Previews: PreviewProvider {