]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Improve swipe experience
authorumonaca <53662960+umonaca@users.noreply.github.com>
Thu, 24 Oct 2019 20:48:11 +0000 (16:48 -0400)
committerThibaut Girka <thib@sitedethib.com>
Sun, 27 Oct 2019 13:41:37 +0000 (14:41 +0100)
Port f4be89e24d3849de4b543faa37493474e2ee8e02 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
app/javascript/flavours/glitch/features/ui/components/columns_area.js

index 958b856db412b935af93dbf5d8221fccaef032fc..431909c72ed6aff493ea9302c682b15bb0260e2c 100644 (file)
@@ -186,7 +186,7 @@ class ColumnsArea extends ImmutablePureComponent {
       const floatingActionButton = shouldHideFAB(this.context.router.history.location.pathname) ? null : <Link key='floating-action-button' to='/statuses/new' className='floating-action-button' aria-label={intl.formatMessage(messages.publish)}><Icon id='pencil' /></Link>;
 
       const content = columnIndex !== -1 ? (
-        <ReactSwipeableViews key='content' index={columnIndex} onChangeIndex={this.handleSwipe} onTransitionEnd={this.handleAnimationEnd} animateTransitions={shouldAnimate} springConfig={{ duration: '400ms', delay: '0s', easeFunction: 'ease' }} style={{ height: '100%' }} disabled={!swipeToChangeColumns}>
+        <ReactSwipeableViews key='content' hysteresis={0.2} threshold={15} index={columnIndex} onChangeIndex={this.handleSwipe} onTransitionEnd={this.handleAnimationEnd} animateTransitions={shouldAnimate} springConfig={{ duration: '400ms', delay: '0s', easeFunction: 'ease' }} style={{ height: '100%' }} disabled={!swipeToChangeColumns}>
           {links.map(this.renderView)}
         </ReactSwipeableViews>
       ) : (