From a10fee3c09c268f0fd61a2f6ed03c6217934e383 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 30 Nov 2018 12:27:19 +0100 Subject: Scroll to detailed status when new ancestors get inserted --- app/javascript/flavours/glitch/features/status/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/features/status/index.js b/app/javascript/flavours/glitch/features/status/index.js index a96c8a1b9..018b52f1b 100644 --- a/app/javascript/flavours/glitch/features/status/index.js +++ b/app/javascript/flavours/glitch/features/status/index.js @@ -376,7 +376,7 @@ export default class Status extends ImmutablePureComponent { } componentDidUpdate (prevProps) { - if (this.props.params.statusId !== prevProps.params.statusId && this.props.params.statusId) { + if (this.props.params.statusId && (this.props.params.statusId !== prevProps.params.statusId || prevProps.ancestorsIds.size < this.props.ancestorsIds.size)) { const { status, ancestorsIds } = this.props; if (status && ancestorsIds && ancestorsIds.size > 0) { -- cgit