Revert "Removes notifications from muted npubs"

This reverts commit 6605c5e583.
This commit is contained in:
Daniel D’Aquino
2025-10-15 14:41:20 -07:00
parent 91426a79b9
commit 8122a8a580

View File

@@ -33,7 +33,7 @@ class NotificationFilter: ObservableObject, Equatable {
self.hellthread_notification_max_pubkeys = hellthread_notification_max_pubkeys self.hellthread_notification_max_pubkeys = hellthread_notification_max_pubkeys
} }
func filter(contacts: Contacts, mutelist_manager: MutelistManager, items: [NotificationItem]) -> [NotificationItem] { func filter(contacts: Contacts, items: [NotificationItem]) -> [NotificationItem] {
return items.reduce(into: []) { acc, item in return items.reduce(into: []) { acc, item in
if !self.state.filter(item) { if !self.state.filter(item) {
@@ -41,7 +41,6 @@ class NotificationFilter: ObservableObject, Equatable {
} }
if let item = item.filter({ ev in if let item = item.filter({ ev in
!mutelist_manager.is_event_muted(ev) &&
self.friend_filter.filter(contacts: contacts, pubkey: ev.pubkey) && self.friend_filter.filter(contacts: contacts, pubkey: ev.pubkey) &&
(!hellthread_notifications_disabled || !ev.is_hellthread(max_pubkeys: hellthread_notification_max_pubkeys)) && (!hellthread_notifications_disabled || !ev.is_hellthread(max_pubkeys: hellthread_notification_max_pubkeys)) &&
// Allow notes that are created no more than 3 seconds in the future // Allow notes that are created no more than 3 seconds in the future
@@ -170,7 +169,7 @@ struct NotificationsView: View {
func NotificationTab(_ filter: NotificationFilter) -> some View { func NotificationTab(_ filter: NotificationFilter) -> some View {
ScrollViewReader { scroller in ScrollViewReader { scroller in
ScrollView { ScrollView {
let notifs = Array(zip(1..., filter.filter(contacts: state.contacts, mutelist_manager: state.mutelist_manager, items: notifications.notifications))) let notifs = Array(zip(1..., filter.filter(contacts: state.contacts, items: notifications.notifications)))
if notifs.isEmpty { if notifs.isEmpty {
EmptyTimelineView() EmptyTimelineView()
} else { } else {