Add option to disable swiping motions across the WebUI (#13885)
Fixes #13882
This commit is contained in:
		@@ -8,6 +8,8 @@ import ReactSwipeableViews from 'react-swipeable-views';
 | 
			
		||||
import TabsBar, { links, getIndex, getLink } from './tabs_bar';
 | 
			
		||||
import { Link } from 'react-router-dom';
 | 
			
		||||
 | 
			
		||||
import { disableSwiping } from 'mastodon/initial_state';
 | 
			
		||||
 | 
			
		||||
import BundleContainer from '../containers/bundle_container';
 | 
			
		||||
import ColumnLoading from './column_loading';
 | 
			
		||||
import DrawerLoading from './drawer_loading';
 | 
			
		||||
@@ -185,7 +187,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' 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%' }}>
 | 
			
		||||
        <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={disableSwiping}>
 | 
			
		||||
          {links.map(this.renderView)}
 | 
			
		||||
        </ReactSwipeableViews>
 | 
			
		||||
      ) : (
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user