File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -56,17 +56,17 @@ export default class Row extends Component {
56
56
57
57
onPanResponderGrant : ( e , gestureState ) => {
58
58
e . persist ( ) ;
59
- this . _wasLongPress = false ;
60
59
61
60
this . _longPressTimer = setTimeout ( ( ) => {
62
- this . _wasLongPress = true ;
63
61
this . _target = e . nativeEvent . target ;
64
62
this . _prevGestureState = {
65
63
...gestureState ,
66
64
moveX : gestureState . x0 ,
67
65
moveY : gestureState . y0 ,
68
66
} ;
69
- this . _toggleActive ( e , gestureState ) ;
67
+ if ( ! this . _active ) {
68
+ this . _toggleActive ( e , gestureState ) ;
69
+ }
70
70
} , this . props . activationTime ) ;
71
71
} ,
72
72
@@ -93,13 +93,13 @@ export default class Row extends Component {
93
93
} ,
94
94
95
95
onPanResponderRelease : ( e , gestureState ) => {
96
- if ( this . _wasLongPress ) {
96
+ if ( this . _active ) {
97
97
this . _toggleActive ( e , gestureState ) ;
98
98
99
- } else if ( this . _isTouchInsideElement ( e ) ) {
99
+ } else {
100
100
this . _cancelLongPress ( ) ;
101
101
102
- if ( this . props . onPress ) {
102
+ if ( this . _isTouchInsideElement ( e ) && this . props . onPress ) {
103
103
this . props . onPress ( ) ;
104
104
}
105
105
}
You can’t perform that action at this time.
0 commit comments