mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 00:08:46 +00:00
Scroll to detailed status when new ancestors get inserted
This commit is contained in:
@@ -376,7 +376,7 @@ export default class Status extends ImmutablePureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate (prevProps) {
|
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;
|
const { status, ancestorsIds } = this.props;
|
||||||
|
|
||||||
if (status && ancestorsIds && ancestorsIds.size > 0) {
|
if (status && ancestorsIds && ancestorsIds.size > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user