Reload notifications when accepted notifications are merged (streaming only) (#31419)
This commit is contained in:
parent
d4f135bc6d
commit
53c183f899
11 changed files with 192 additions and 24 deletions
|
@ -10,7 +10,7 @@ import {
|
|||
deleteAnnouncement,
|
||||
} from './announcements';
|
||||
import { updateConversations } from './conversations';
|
||||
import { processNewNotificationForGroups } from './notification_groups';
|
||||
import { processNewNotificationForGroups, refreshStaleNotificationGroups } from './notification_groups';
|
||||
import { updateNotifications, expandNotifications } from './notifications';
|
||||
import { updateStatus } from './statuses';
|
||||
import {
|
||||
|
@ -108,6 +108,14 @@ export const connectTimelineStream = (timelineId, channelName, params = {}, opti
|
|||
}
|
||||
break;
|
||||
}
|
||||
case 'notifications_merged':
|
||||
const state = getState();
|
||||
if (state.notifications.top || !state.notifications.mounted)
|
||||
dispatch(expandNotifications({ forceLoad: true, maxId: undefined }));
|
||||
if(state.settings.getIn(['notifications', 'groupingBeta'], false)) {
|
||||
dispatch(refreshStaleNotificationGroups());
|
||||
}
|
||||
break;
|
||||
case 'conversation':
|
||||
// @ts-expect-error
|
||||
dispatch(updateConversations(JSON.parse(data.payload)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue