mirror of https://github.com/mastodon/mastodon.git
Avoid having 2 gaps at the top of the notifications after a disconnect
parent
0f9bfb342c
commit
e45f7a3bb1
|
@ -161,11 +161,15 @@ export const notificationsGroupsReducer =
|
|||
}
|
||||
})
|
||||
.addCase(disconnectTimeline, (state, action) => {
|
||||
if (action.payload.timeline === 'home')
|
||||
if (action.payload.timeline === 'home') {
|
||||
if (state.groups.length > 0 && state.groups[0]?.type === 'gap')
|
||||
state.groups.shift();
|
||||
|
||||
state.groups.unshift({
|
||||
type: 'gap',
|
||||
loadUrl: 'TODO_LOAD_URL_TOP_OF_TL', // TODO
|
||||
});
|
||||
}
|
||||
})
|
||||
.addCase(timelineDelete, (state, action) => {
|
||||
removeNotificationsForStatus(state, action.payload.statusId);
|
||||
|
|
Loading…
Reference in New Issue