diff options
author | ThibG <thib@sitedethib.com> | 2020-12-07 20:07:24 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2020-12-09 15:12:28 +0100 |
commit | 7d0e45a3be167d95cbc4d5f80fa989a9371802ae (patch) | |
tree | dba9599f5416483c4a9fcad0002e5a2d6bcd4de1 /app/javascript/flavours/glitch/features/ui | |
parent | e18f9f822834a4467a6b226e84f40a7790f9c9f5 (diff) |
[Glitch] Fix column swiping animation logic
Port 0b437325dc93a1d28202b5ff30eaafc9b4e571b7 to glitch-soc Co-authored-by: Claire <claire.github-309c@sitedethib.com> Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/columns_area.js | 4 |
1 files changed, 3 insertions, 1 deletions
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() { |