From c7c5eb9e99314bd6e5f5731a52ec6b8bd402fe13 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 12 Apr 2023 17:39:34 -0700 Subject: [PATCH] Filter notifications by content prefs --- src/state/models/feeds/notifications.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/state/models/feeds/notifications.ts b/src/state/models/feeds/notifications.ts index 49dfea64a8..12db9510d4 100644 --- a/src/state/models/feeds/notifications.ts +++ b/src/state/models/feeds/notifications.ts @@ -545,6 +545,12 @@ export class NotificationsFeedModel { ): Promise { const promises = [] const itemModels: NotificationsFeedItemModel[] = [] + items = items.filter(item => { + return ( + this.rootStore.preferences.getLabelPreference(item.labels).pref !== + 'hide' + ) + }) for (const item of groupNotifications(items)) { const itemModel = new NotificationsFeedItemModel( this.rootStore,