damus

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

commit 209f3e87594e873d61f5f0a1f268105f5508052c
parent 897621b5ed574f58b4e864fe947c3ee6a8e56974
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 20 Apr 2023 08:24:03 -0700

onlyzaps: Clean up reaction filter logic a bit

Diffstat:
Mdamus/Models/HomeModel.swift | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift @@ -202,9 +202,11 @@ class HomeModel: ObservableObject { } notifications.filter { ev in - !damus_state.contacts.is_muted(ev.pubkey) && - !damus_state.muted_threads.isMutedThread(ev, privkey: damus_state.keypair.privkey) && - (ev.kind != NostrKind.like.rawValue || !damus_state.settings.hide_reactions) + if damus_state.settings.hide_reactions && ev.known_kind == NostrKind.like { + return false + } + + return !damus_state.contacts.is_muted(ev.pubkey) && !damus_state.muted_threads.isMutedThread(ev, privkey: damus_state.keypair.privkey) } }