diff options
author | Starfall <us@starfall.systems> | 2020-12-10 18:39:04 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2020-12-10 18:39:04 -0600 |
commit | ab127fd7941b7c84e6d6fe3071d41f52affb143c (patch) | |
tree | 7daabe20eb581a2b9215ed9c4f161bcab89019bd /app/javascript/flavours/glitch/features/notifications | |
parent | e68391fbaaf409cc01f74c8cf7076520a43ae06e (diff) | |
parent | 4acb5c90a271779a050c4d3b54562bd29359e5c0 (diff) |
Merge branch 'glitch' into main
Diffstat (limited to 'app/javascript/flavours/glitch/features/notifications')
-rw-r--r-- | app/javascript/flavours/glitch/features/notifications/index.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/notifications/index.js b/app/javascript/flavours/glitch/features/notifications/index.js index 97434b586..73d969517 100644 --- a/app/javascript/flavours/glitch/features/notifications/index.js +++ b/app/javascript/flavours/glitch/features/notifications/index.js @@ -37,10 +37,16 @@ const messages = defineMessages({ markAsRead : { id: 'notifications.mark_as_read', defaultMessage: 'Mark every notification as read' }, }); +const getExcludedTypes = createSelector([ + state => state.getIn(['settings', 'notifications', 'shows']), +], (shows) => { + return ImmutableList(shows.filter(item => !item).keys()); +}); + const getNotifications = createSelector([ state => state.getIn(['settings', 'notifications', 'quickFilter', 'show']), state => state.getIn(['settings', 'notifications', 'quickFilter', 'active']), - state => ImmutableList(state.getIn(['settings', 'notifications', 'shows']).filter(item => !item).keys()), + getExcludedTypes, state => state.getIn(['notifications', 'items']), ], (showFilterBar, allowedType, excludedTypes, notifications) => { if (!showFilterBar || allowedType === 'all') { |