@@ -103,9 +103,6 @@ const animatedSubscribeValue = (animatedValue: Animated.Value) => {
103
103
} ;
104
104
105
105
class CardStack extends React . Component < Props > {
106
- static defaultProps = {
107
- globalGesturesEnabled : Platform . OS === 'ios' ,
108
- } ;
109
106
/**
110
107
* Used to identify the starting point of the position when the gesture starts, such that it can
111
108
* 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> {
260
257
if ( index !== scene . index ) {
261
258
return false ;
262
259
}
260
+ // $FlowFixMe
261
+ const { getIsBackNavigationEnabled } = this . props . navigation ;
262
+ if ( typeof getIsBackNavigationEnabled === 'function' ) {
263
+ if ( ! getIsBackNavigationEnabled ( ) ) return false ;
264
+ }
263
265
const immediateIndex =
264
266
this . _immediateIndex == null ? index : this . _immediateIndex ;
265
267
const currentDragDistance = gesture [ isVertical ? 'dy' : 'dx' ] ;
@@ -358,13 +360,12 @@ class CardStack extends React.Component<Props> {
358
360
} ) ;
359
361
360
362
const { options } = this . _getScreenDetails ( scene ) ;
361
- const screenGesturesEnabled =
362
- typeof options . gesturesEnabled === 'boolean' && options . gesturesEnabled ;
363
363
364
364
const gesturesEnabled =
365
- this . props . globalGesturesEnabled && screenGesturesEnabled ;
365
+ typeof options . gesturesEnabled === 'boolean' && options . gesturesEnabled ;
366
366
367
- const handlers = gesturesEnabled ? responder . panHandlers : { } ;
367
+ const handlers =
368
+ gesturesEnabled && Platform . OS === 'ios' ? responder . panHandlers : { } ;
368
369
const containerStyle = [
369
370
styles . container ,
370
371
this . _getTransitionConfig ( ) . containerStyle ,
0 commit comments