From 479031e8e131ce58ff256ce6ab20d0100a750cdb 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 58a3eaccba1ff78ef64e26641f7a370e268d91fe 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 5c2e387a5f..640be19aba 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() {