From 7d0e45a3be167d95cbc4d5f80fa989a9371802ae Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 7 Dec 2020 20:07:24 +0100 Subject: [PATCH] [Glitch] Fix column swiping animation logic Port 0b437325dc93a1d28202b5ff30eaafc9b4e571b7 to glitch-soc Co-authored-by: Claire Signed-off-by: Claire --- .../flavours/glitch/features/ui/components/columns_area.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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() {