Fix lint errors

This commit is contained in:
Brent Vatne
2018-10-12 11:34:03 -07:00
parent 81f1915075
commit 8c952abc2c
10 changed files with 18 additions and 49 deletions

View File

@@ -1,9 +1,7 @@
import React from 'react';
import {
Animated,
StyleSheet,
PanResponder,
Platform,
View,
I18nManager,
@@ -27,8 +25,6 @@ import StackGestureContext from '../../utils/StackGestureContext';
import clamp from '../../utils/clamp';
import { supportsImprovedSpringAnimation } from '../../utils/ReactNativeFeatures';
const emptyFunction = () => {};
const IPHONE_XS_HEIGHT = 812; // iPhone X and XS
const IPHONE_XR_HEIGHT = 896; // iPhone XR and XS Max
const { width: WINDOW_WIDTH, height: WINDOW_HEIGHT } = Dimensions.get('window');
@@ -63,11 +59,6 @@ const ANIMATION_DURATION = 500;
*/
const POSITION_THRESHOLD = 1 / 2;
/**
* The threshold (in pixels) to start the gesture action.
*/
const RESPOND_THRESHOLD = 20;
/**
* The distance of touch start from the edge of the screen where the gesture will be recognized
*/
@@ -390,8 +381,6 @@ class StackViewLayout extends React.Component {
// TODO: remove this __getValue!
let distance = layout.height.__getValue();
let translationY = nativeEvent.translationY;
let value = index - nativeEvent.translationY / distance;
return clamp(index - 1, value, index);
};
@@ -412,7 +401,7 @@ class StackViewLayout extends React.Component {
}
};
_handleActivateGestureHorizontal = nativeEvent => {
_handleActivateGestureHorizontal = () => {
let { index } = this.props.transitionProps.navigation.state;
if (this._isMotionInverted()) {
@@ -449,7 +438,7 @@ class StackViewLayout extends React.Component {
}
};
_handleActivateGestureVertical = nativeEvent => {
_handleActivateGestureVertical = () => {
let { index } = this.props.transitionProps.navigation.state;
this.setState({
@@ -472,8 +461,7 @@ class StackViewLayout extends React.Component {
_handleReleaseHorizontal = nativeEvent => {
const {
transitionProps: { navigation, position, layout, scene },
mode,
transitionProps: { navigation, position, layout },
} = this.props;
const { index } = navigation.state;
const immediateIndex =
@@ -525,8 +513,7 @@ class StackViewLayout extends React.Component {
_handleReleaseVertical = nativeEvent => {
const {
transitionProps: { navigation, position, layout, scene },
mode,
transitionProps: { navigation, position, layout },
} = this.props;
const { index } = navigation.state;
const immediateIndex =