From 8117ba2cb1760f834ab13aed7f4d144c8e0ceefc Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 30 Nov 2018 12:27:19 +0100 Subject: [PATCH] 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 a96c8a1b98..018b52f1b1 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) {