From 3b07fe1bba713fb10f5c873dccb38f6875180c77 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 10 Oct 2024 15:42:08 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20=E2=80=9CMark=20every=20notification=20as?= =?UTF-8?q?=20read=E2=80=9D=20not=20updating=20the=20read=20marker=20if=20?= =?UTF-8?q?scrolled=20down=20(#32385)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 8b033f0fc..91e91d754 100644 --- a/app/javascript/mastodon/reducers/notification_groups.ts +++ b/app/javascript/mastodon/reducers/notification_groups.ts @@ -559,7 +559,10 @@ export const notificationGroupsReducer = createReducer( 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 (