0
0
Fork 0

Add option to disable swiping motions across the WebUI (#13885)

Fixes #13882
This commit is contained in:
ThibG 2020-09-30 19:31:03 +02:00 committed by GitHub
parent 2ee7e2c5c3
commit 78e45a5285
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 21 additions and 3 deletions

View file

@ -10,6 +10,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
import ImageLoader from './image_loader';
import Icon from 'mastodon/components/icon';
import GIFV from 'mastodon/components/gifv';
import { disableSwiping } from 'mastodon/initial_state';
const messages = defineMessages({
close: { id: 'lightbox.close', defaultMessage: 'Close' },
@ -212,6 +213,7 @@ class MediaModal extends ImmutablePureComponent {
containerStyle={containerStyle}
onChangeIndex={this.handleSwipe}
index={index}
disabled={disableSwiping}
>
{content}
</ReactSwipeableViews>