Replaced occurances of wrapWithPreventDoubleTap with preventDoubleTap (#1499)

This commit is contained in:
Harrison Healey 2018-03-13 12:14:35 -04:00 committed by Saturnino Abril
parent 6c0242cf19
commit e300ed5c88
5 changed files with 14 additions and 14 deletions

View file

@ -10,7 +10,7 @@ import {
} from 'react-native';
import IonIcon from 'react-native-vector-icons/Ionicons';
import {wrapWithPreventDoubleTap} from 'app/utils/tap';
import {preventDoubleTap} from 'app/utils/tap';
import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
import {DirectChannel, GroupChannel, PublicChannel, PrivateChannel} from 'share_extension/common/icons/channel_type';
@ -30,7 +30,7 @@ export default class ExtensionChannelItem extends PureComponent {
theme: PropTypes.object.isRequired,
};
onPress = wrapWithPreventDoubleTap(() => {
onPress = preventDoubleTap(() => {
const {channel, onSelectChannel} = this.props;
requestAnimationFrame(() => {
onSelectChannel(channel);

View file

@ -26,7 +26,7 @@ import {getFormattedFileSize, lookupMimeType} from 'mattermost-redux/utils/file_
import PaperPlane from 'app/components/paper_plane';
import mattermostManaged from 'app/mattermost_managed';
import {emptyFunction} from 'app/utils/general';
import {wrapWithPreventDoubleTap} from 'app/utils/tap';
import {preventDoubleTap} from 'app/utils/tap';
import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
import {
@ -180,7 +180,7 @@ export default class ExtensionPost extends PureComponent {
this.input = ref;
};
goToChannels = wrapWithPreventDoubleTap(() => {
goToChannels = preventDoubleTap(() => {
const {formatMessage} = this.context.intl;
const {navigation} = this.props;
const navigateAction = NavigationActions.navigate({
@ -197,7 +197,7 @@ export default class ExtensionPost extends PureComponent {
navigation.dispatch(navigateAction);
});
goToTeams = wrapWithPreventDoubleTap(() => {
goToTeams = preventDoubleTap(() => {
const {formatMessage} = this.context.intl;
const {navigation} = this.props;
const navigateAction = NavigationActions.navigate({

View file

@ -10,7 +10,7 @@ import {
} from 'react-native';
import IonIcon from 'react-native-vector-icons/Ionicons';
import {wrapWithPreventDoubleTap} from 'app/utils/tap';
import {preventDoubleTap} from 'app/utils/tap';
import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
import TeamIcon from 'app/components/team_icon';
@ -23,7 +23,7 @@ export default class TeamItem extends PureComponent {
theme: PropTypes.object.isRequired,
};
onPress = wrapWithPreventDoubleTap(() => {
onPress = preventDoubleTap(() => {
const {onSelectTeam, team} = this.props;
onSelectTeam(team.id);
});

View file

@ -28,7 +28,7 @@ import {isMinimumServerVersion} from 'mattermost-redux/utils/helpers';
import mattermostBucket from 'app/mattermost_bucket';
import {generateId, getAllowedServerMaxFileSize} from 'app/utils/file';
import {wrapWithPreventDoubleTap} from 'app/utils/tap';
import {preventDoubleTap} from 'app/utils/tap';
import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
import Config from 'assets/config';
@ -137,7 +137,7 @@ export default class ExtensionPost extends PureComponent {
this.scrollView = ref;
};
goToChannels = wrapWithPreventDoubleTap(() => {
goToChannels = preventDoubleTap(() => {
const {navigator, theme} = this.props;
const {channel, entities, team} = this.state;
@ -158,7 +158,7 @@ export default class ExtensionPost extends PureComponent {
});
});
goToTeams = wrapWithPreventDoubleTap(() => {
goToTeams = preventDoubleTap(() => {
const {navigator, theme} = this.props;
const {formatMessage} = this.context.intl;
const {team} = this.state;
@ -179,7 +179,7 @@ export default class ExtensionPost extends PureComponent {
});
});
handleCancel = wrapWithPreventDoubleTap(() => {
handleCancel = preventDoubleTap(() => {
this.props.onClose();
});
@ -557,7 +557,7 @@ export default class ExtensionPost extends PureComponent {
});
};
sendMessage = wrapWithPreventDoubleTap(async () => {
sendMessage = preventDoubleTap(async () => {
const {authenticated, onClose} = this.props;
const {channel, entities, files, value} = this.state;
const {currentUserId} = entities.users;

View file

@ -9,7 +9,7 @@ import {
View,
} from 'react-native';
import {wrapWithPreventDoubleTap} from 'app/utils/tap';
import {preventDoubleTap} from 'app/utils/tap';
import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
import TeamIcon from 'app/components/team_icon';
@ -22,7 +22,7 @@ export default class TeamsListItem extends React.PureComponent {
theme: PropTypes.object.isRequired,
};
onPress = wrapWithPreventDoubleTap(() => {
onPress = preventDoubleTap(() => {
const {onSelectTeam, team} = this.props;
onSelectTeam(team);
});