]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Fix streaming notifications not using quick filter logic
authorClaire <claire.github-309c@sitedethib.com>
Sat, 7 May 2022 02:50:40 +0000 (04:50 +0200)
committersingle-right-quote <11325618-aescling@users.noreply.gitlab.com>
Fri, 27 May 2022 03:32:56 +0000 (23:32 -0400)
Port f17e73da09e6c63665aee4e9731df7808094960e to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
app/javascript/flavours/glitch/actions/notifications.js

index 42ad39efab2018ef51c6e6dfec5a5d70d81a9d7d..85938867bf013d6a9fb8e8b26b9a541ede633d09 100644 (file)
@@ -70,7 +70,8 @@ export const loadPending = () => ({
 
 export function updateNotifications(notification, intlMessages, intlLocale) {
   return (dispatch, getState) => {
-    const showInColumn = getState().getIn(['settings', 'notifications', 'shows', notification.type], true);
+    const activeFilter = getState().getIn(['settings', 'notifications', 'quickFilter', 'active']);
+    const showInColumn = activeFilter === 'all' ? getState().getIn(['settings', 'notifications', 'shows', notification.type], true) : activeFilter === notification.type;
     const showAlert    = getState().getIn(['settings', 'notifications', 'alerts', notification.type], true);
     const playSound    = getState().getIn(['settings', 'notifications', 'sounds', notification.type], true);
     const filters      = getFiltersRegex(getState(), { contextType: 'notifications' });