File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 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 {
5656
5757 onPanResponderGrant : ( e , gestureState ) => {
5858 e . persist ( ) ;
59- this . _wasLongPress = false ;
6059
6160 this . _longPressTimer = setTimeout ( ( ) => {
62- this . _wasLongPress = true ;
6361 this . _target = e . nativeEvent . target ;
6462 this . _prevGestureState = {
6563 ...gestureState ,
6664 moveX : gestureState . x0 ,
6765 moveY : gestureState . y0 ,
6866 } ;
69- this . _toggleActive ( e , gestureState ) ;
67+ if ( ! this . _active ) {
68+ this . _toggleActive ( e , gestureState ) ;
69+ }
7070 } , this . props . activationTime ) ;
7171 } ,
7272
@@ -93,13 +93,13 @@ export default class Row extends Component {
9393 } ,
9494
9595 onPanResponderRelease : ( e , gestureState ) => {
96- if ( this . _wasLongPress ) {
96+ if ( this . _active ) {
9797 this . _toggleActive ( e , gestureState ) ;
9898
99- } else if ( this . _isTouchInsideElement ( e ) ) {
99+ } else {
100100 this . _cancelLongPress ( ) ;
101101
102- if ( this . props . onPress ) {
102+ if ( this . _isTouchInsideElement ( e ) && this . props . onPress ) {
103103 this . props . onPress ( ) ;
104104 }
105105 }
You can’t perform that action at this time.
0 commit comments