mirror of
git://jb55.com/damus
synced 2024-09-19 19:46:51 +00:00
mute bestofhn events while testing
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
445e44cd1e
commit
510926fa70
@ -165,7 +165,9 @@ struct ContentView: View {
|
|||||||
last_event_of_kind[ev.kind] = ev
|
last_event_of_kind[ev.kind] = ev
|
||||||
}
|
}
|
||||||
if ev.kind == 1 {
|
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 }
|
self.events = self.events.sorted { $0.created_at > $1.created_at }
|
||||||
} else if ev.kind == 0 {
|
} else if ev.kind == 0 {
|
||||||
handle_metadata_event(ev)
|
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 {
|
struct ContentView_Previews: PreviewProvider {
|
||||||
|
Loading…
Reference in New Issue
Block a user