0
0
Fork 0

Do not scroll the columns area due to redirection (#4541)

Commit 9d1f8b9d6a scrolls the columns area
when the route changes since the user is likely to want to see the
rightmost column in such cases.

However, redirection is automatic and does not indicate users' intension.
Do not scroll the columns area due to one.
This commit is contained in:
Akihiko Odaki 2017-08-29 21:16:21 +09:00 committed by Eugen Rochko
parent 0827c09c44
commit 9958eba356
3 changed files with 20 additions and 8 deletions

View file

@ -24,7 +24,7 @@ const componentMap = {
'FAVOURITES': FavouritedStatuses,
};
@injectIntl
@component => injectIntl(component, { withRef: true })
export default class ColumnsArea extends ImmutablePureComponent {
static contextTypes = {
@ -51,13 +51,13 @@ export default class ColumnsArea extends ImmutablePureComponent {
this.setState({ shouldAnimate: true });
}
componentDidUpdate(prevProps) {
componentDidUpdate() {
this.lastIndex = getIndex(this.context.router.history.location.pathname);
this.setState({ shouldAnimate: true });
}
if (this.props.children !== prevProps.children && !this.props.singleColumn) {
scrollRight(this.node);
}
handleChildrenContentChange() {
scrollRight(this.node);
}
handleSwipe = (index) => {