logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git
commit: bc6e95822930dc21f4f1a2c264ed9b976ef162f4
parent a6d8d1036a1a4336cb8fde6e3c318685cf6a7226
Author: Sorin Davidoi <sorin.davidoi@gmail.com>
Date:   Thu,  8 Jun 2017 17:41:43 +0200

feat: Swipeable media

Diffstat:

Mapp/javascript/mastodon/features/ui/components/media_modal.js5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/javascript/mastodon/features/ui/components/media_modal.js b/app/javascript/mastodon/features/ui/components/media_modal.js @@ -1,4 +1,5 @@ import React from 'react'; +import ReactSwipeable from 'react-swipeable'; import LoadingIndicator from '../../../components/loading_indicator'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; @@ -84,7 +85,9 @@ class MediaModal extends ImmutablePureComponent { <div className='media-modal__content'> <IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={16} /> - {content} + <ReactSwipeable onSwipedRight={this.handlePrevClick} onSwipedLeft={this.handleNextClick}> + {content} + </ReactSwipeable> </div> {rightNav}