From 079d681ac6f279f3a7a6be5c3734549f3be8f912 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 8 Aug 2024 19:00:05 +0200 Subject: [PATCH] Fix uninitialized grouped notifications read marker on initial load (#31347) --- app/javascript/mastodon/reducers/notification_groups.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/reducers/notification_groups.ts b/app/javascript/mastodon/reducers/notification_groups.ts index 3a36023211..871f50364b 100644 --- a/app/javascript/mastodon/reducers/notification_groups.ts +++ b/app/javascript/mastodon/reducers/notification_groups.ts @@ -474,8 +474,11 @@ export const notificationGroupsReducer = createReducer( state.lastReadId, action.payload.markers.notifications.last_read_id, ) < 0 - ) + ) { state.lastReadId = action.payload.markers.notifications.last_read_id; + state.readMarkerId = + action.payload.markers.notifications.last_read_id; + } }) .addCase(mountNotifications, (state) => { state.mounted += 1;