Scroll to detailed status when new ancestors get inserted

master
Thibaut Girka 6 years ago committed by ThibG
parent 31599ad91c
commit a10fee3c09
  1. 2
      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) {

Loading…
Cancel
Save