From: ThibG Date: Mon, 7 Dec 2020 19:07:24 +0000 (+0100) Subject: [Glitch] Fix column swiping animation logic X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=7d0e45a3be167d95cbc4d5f80fa989a9371802ae;p=mastodon.git [Glitch] Fix column swiping animation logic Port 0b437325dc93a1d28202b5ff30eaafc9b4e571b7 to glitch-soc Co-authored-by: Claire Signed-off-by: Claire --- diff --git a/app/javascript/flavours/glitch/features/ui/components/columns_area.js b/app/javascript/flavours/glitch/features/ui/components/columns_area.js index 5c2e387a5..640be19ab 100644 --- a/app/javascript/flavours/glitch/features/ui/components/columns_area.js +++ b/app/javascript/flavours/glitch/features/ui/components/columns_area.js @@ -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() {