From dad9baaa5456cc6ea58b54e05a4e96bf891b34e7 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 8 Aug 2024 19:00:05 +0200 Subject: [PATCH] [Glitch] Fix uninitialized grouped notifications read marker on initial load Port 079d681ac6f279f3a7a6be5c3734549f3be8f912 to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/reducers/notification_groups.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/reducers/notification_groups.ts b/app/javascript/flavours/glitch/reducers/notification_groups.ts index a657cf5c97..4dedfe27a8 100644 --- a/app/javascript/flavours/glitch/reducers/notification_groups.ts +++ b/app/javascript/flavours/glitch/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;