about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/ui
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-12-07 20:07:24 +0100
committerClaire <claire.github-309c@sitedethib.com>2020-12-09 15:12:28 +0100
commit7d0e45a3be167d95cbc4d5f80fa989a9371802ae (patch)
treedba9599f5416483c4a9fcad0002e5a2d6bcd4de1 /app/javascript/flavours/glitch/features/ui
parente18f9f822834a4467a6b226e84f40a7790f9c9f5 (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.js4
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() {