From 305f1e5757e4a45701cae2ae510268d7b7efb843 Mon Sep 17 00:00:00 2001 From: diondiondion Date: Thu, 23 Oct 2025 17:52:07 +0200 Subject: [PATCH] [Glitch] Fix "new post highlighting" in threads being applied when navigating between posts Port 1ba579b0a181fbfff514ef32b50179d2ab1fc342 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/features/status/index.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/features/status/index.jsx b/app/javascript/flavours/glitch/features/status/index.jsx index a88657f2a6..072842ed3a 100644 --- a/app/javascript/flavours/glitch/features/status/index.jsx +++ b/app/javascript/flavours/glitch/features/status/index.jsx @@ -529,12 +529,14 @@ class Status extends ImmutablePureComponent { componentDidUpdate (prevProps) { const { status, ancestorsIds, descendantsIds } = this.props; - if (status && (ancestorsIds.length > prevProps.ancestorsIds.length || prevProps.status?.get('id') !== status.get('id'))) { + const isSameStatus = status && (prevProps.status?.get('id') === status.get('id')); + + if (status && (ancestorsIds.length > prevProps.ancestorsIds.length || !isSameStatus)) { this._scrollStatusIntoView(); } // Only highlight replies after the initial load - if (prevProps.descendantsIds.length) { + if (prevProps.descendantsIds.length && isSameStatus) { const newRepliesIds = difference(descendantsIds, prevProps.descendantsIds); if (newRepliesIds.length) {