@@ -103,9 +103,6 @@ const animatedSubscribeValue = (animatedValue: Animated.Value) => {
103103} ;
104104
105105class CardStack extends React . Component < Props > {
106- static defaultProps = {
107- globalGesturesEnabled : Platform . OS === 'ios' ,
108- } ;
109106 /**
110107 * Used to identify the starting point of the position when the gesture starts, such that it can
111108 * be updated according to its relative position. This means that a card can effectively be
@@ -260,6 +257,11 @@ class CardStack extends React.Component<Props> {
260257 if ( index !== scene . index ) {
261258 return false ;
262259 }
260+ // $FlowFixMe
261+ const { getIsBackNavigationEnabled } = this . props . navigation ;
262+ if ( typeof getIsBackNavigationEnabled === 'function' ) {
263+ if ( ! getIsBackNavigationEnabled ( ) ) return false ;
264+ }
263265 const immediateIndex =
264266 this . _immediateIndex == null ? index : this . _immediateIndex ;
265267 const currentDragDistance = gesture [ isVertical ? 'dy' : 'dx' ] ;
@@ -358,13 +360,12 @@ class CardStack extends React.Component<Props> {
358360 } ) ;
359361
360362 const { options } = this . _getScreenDetails ( scene ) ;
361- const screenGesturesEnabled =
362- typeof options . gesturesEnabled === 'boolean' && options . gesturesEnabled ;
363363
364364 const gesturesEnabled =
365- this . props . globalGesturesEnabled && screenGesturesEnabled ;
365+ typeof options . gesturesEnabled === 'boolean' && options . gesturesEnabled ;
366366
367- const handlers = gesturesEnabled ? responder . panHandlers : { } ;
367+ const handlers =
368+ gesturesEnabled && Platform . OS === 'ios' ? responder . panHandlers : { } ;
368369 const containerStyle = [
369370 styles . container ,
370371 this . _getTransitionConfig ( ) . containerStyle ,
0 commit comments