[Glitch] Bundle quotes and mentions in the same quickfilter bar since quotes don't have their own icon

Port 4838085d66 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Claire committed 2025-08-06 22:43:44 +02:00
1 parent 4b507c0f05
commit 9da8c9e07c
2 files changed
+9 -3

No files matched your search

@@ -31,7 +31,9 @@ import { NOTIFICATIONS_FILTER_SET } from './notifications';
import { saveSettings } from './settings';
function excludeAllTypesExcept(filter: string) {
return allNotificationTypes.filter((item) => item !== filter);
return allNotificationTypes.filter(
(item) => item !== filter && !(item === 'quote' && filter === 'mention'),
);
}
function getExcludedTypes(state: RootState) {
@@ -156,7 +158,8 @@ export const processNewNotificationForGroups = createAppAsyncThunk(
const showInColumn =
activeFilter === 'all'
? notificationShows[notification.type] !== false
: activeFilter === notification.type;
: activeFilter === notification.type ||
(activeFilter === 'mention' && notification.type === 'quote');
if (!showInColumn) return;
@@ -26,7 +26,10 @@ const filterNotificationsByAllowedTypes = (
);
}
return notifications.filter(
(item) => item.type === 'gap' || allowedType === item.type,
(item) =>
item.type === 'gap' ||
allowedType === item.type ||
(allowedType === 'mention' && item.type === 'quote'),
);
};