mirror of
https://github.com/mastodon/mastodon.git
synced 2025-10-07 09:32:44 +00:00
Bundle quotes and mentions in the same quickfilter bar since quotes don't have their own icon (#35700)
This commit is contained in:
parent
9ec99ffef1
commit
4838085d66
|
@ -31,7 +31,9 @@ import { NOTIFICATIONS_FILTER_SET } from './notifications';
|
||||||
import { saveSettings } from './settings';
|
import { saveSettings } from './settings';
|
||||||
|
|
||||||
function excludeAllTypesExcept(filter: string) {
|
function excludeAllTypesExcept(filter: string) {
|
||||||
return allNotificationTypes.filter((item) => item !== filter);
|
return allNotificationTypes.filter(
|
||||||
|
(item) => item !== filter && !(item === 'quote' && filter === 'mention'),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getExcludedTypes(state: RootState) {
|
function getExcludedTypes(state: RootState) {
|
||||||
|
@ -156,7 +158,8 @@ export const processNewNotificationForGroups = createAppAsyncThunk(
|
||||||
const showInColumn =
|
const showInColumn =
|
||||||
activeFilter === 'all'
|
activeFilter === 'all'
|
||||||
? notificationShows[notification.type] !== false
|
? notificationShows[notification.type] !== false
|
||||||
: activeFilter === notification.type;
|
: activeFilter === notification.type ||
|
||||||
|
(activeFilter === 'mention' && notification.type === 'quote');
|
||||||
|
|
||||||
if (!showInColumn) return;
|
if (!showInColumn) return;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,10 @@ const filterNotificationsByAllowedTypes = (
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return notifications.filter(
|
return notifications.filter(
|
||||||
(item) => item.type === 'gap' || allowedType === item.type,
|
(item) =>
|
||||||
|
item.type === 'gap' ||
|
||||||
|
allowedType === item.type ||
|
||||||
|
(allowedType === 'mention' && item.type === 'quote'),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user