[Glitch] Fix column swiping animation logic

Port 0b437325dc to glitch-soc

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
master
ThibG 2020-12-07 20:07:24 +01:00 committed by Claire
parent e18f9f8228
commit 7d0e45a3be
1 changed files with 3 additions and 1 deletions

View File

@ -75,7 +75,9 @@ class ColumnsArea extends ImmutablePureComponent {
}
componentWillReceiveProps() {
this.setState({ shouldAnimate: false });
if (typeof this.pendingIndex !== 'number' && this.lastIndex !== getIndex(this.context.router.history.location.pathname)) {
this.setState({ shouldAnimate: false });
}
}
componentDidMount() {