mirror of https://github.com/mastodon/mastodon
Enable grouped notifications unconditionally (#31929)
parent
e0648a916a
commit
c620452fd7
@ -1,14 +1,10 @@
|
|||||||
import { selectUseGroupedNotifications } from 'mastodon/selectors/settings';
|
|
||||||
import { createAppAsyncThunk } from 'mastodon/store';
|
import { createAppAsyncThunk } from 'mastodon/store';
|
||||||
|
|
||||||
import { fetchNotifications } from './notification_groups';
|
import { fetchNotifications } from './notification_groups';
|
||||||
import { expandNotifications } from './notifications';
|
|
||||||
|
|
||||||
export const initializeNotifications = createAppAsyncThunk(
|
export const initializeNotifications = createAppAsyncThunk(
|
||||||
'notifications/initialize',
|
'notifications/initialize',
|
||||||
(_, { dispatch, getState }) => {
|
(_, { dispatch }) => {
|
||||||
if (selectUseGroupedNotifications(getState()))
|
|
||||||
void dispatch(fetchNotifications());
|
void dispatch(fetchNotifications());
|
||||||
else void dispatch(expandNotifications({}));
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -1,13 +1,8 @@
|
|||||||
import Notifications from 'mastodon/features/notifications';
|
|
||||||
import Notifications_v2 from 'mastodon/features/notifications_v2';
|
import Notifications_v2 from 'mastodon/features/notifications_v2';
|
||||||
import { selectUseGroupedNotifications } from 'mastodon/selectors/settings';
|
|
||||||
import { useAppSelector } from 'mastodon/store';
|
|
||||||
|
|
||||||
export const NotificationsWrapper = (props) => {
|
export const NotificationsWrapper = (props) => {
|
||||||
const optedInGroupedNotifications = useAppSelector(selectUseGroupedNotifications);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
optedInGroupedNotifications ? <Notifications_v2 {...props} /> : <Notifications {...props} />
|
<Notifications_v2 {...props} />
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue