Fix “Mark every notification as read” not updating the read marker if scrolled down (#32385)

pull/2884/head
Claire 2024-10-10 15:42:08 +02:00 committed by GitHub
parent 9350cd31d7
commit 3b07fe1bba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -559,7 +559,10 @@ export const notificationGroupsReducer = createReducer<NotificationGroupsState>(
compareId(state.lastReadId, mostRecentGroup.page_max_id) < 0
)
state.lastReadId = mostRecentGroup.page_max_id;
commitLastReadId(state);
// We don't call `commitLastReadId`, because that is conditional
// and we want to unconditionally update the state instead.
state.readMarkerId = state.lastReadId;
})
.addCase(fetchMarkers.fulfilled, (state, action) => {
if (