File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -249,6 +249,7 @@ class Screen extends React.Component<ScreenProps> {
249249 activityState,
250250 children,
251251 isNativeStack,
252+ gestureResponseDistance,
252253 ...props
253254 } = rest ;
254255
@@ -276,6 +277,12 @@ class Screen extends React.Component<ScreenProps> {
276277 < AnimatedNativeScreen
277278 { ...props }
278279 activityState = { activityState }
280+ gestureResponseDistance = { {
281+ start : gestureResponseDistance ?. start ?? - 1 ,
282+ end : gestureResponseDistance ?. end ?? - 1 ,
283+ top : gestureResponseDistance ?. top ?? - 1 ,
284+ bottom : gestureResponseDistance ?. bottom ?? - 1 ,
285+ } }
279286 // This prevents showing blank screen when navigating between multiple screens with freezing
280287 // https://github.com/software-mansion/react-native-screens/pull/1208
281288 ref = { handleRef }
Original file line number Diff line number Diff line change @@ -192,29 +192,6 @@ const RouteView = ({
192192 }
193193 }
194194
195- if ( gestureResponseDistance === undefined ) {
196- // default values, required for unification of Fabric & Paper implementation
197- gestureResponseDistance = {
198- start : - 1 ,
199- end : - 1 ,
200- top : - 1 ,
201- bottom : - 1 ,
202- } ;
203- } else {
204- if ( gestureResponseDistance . start === undefined ) {
205- gestureResponseDistance . start = - 1 ;
206- }
207- if ( gestureResponseDistance . end === undefined ) {
208- gestureResponseDistance . end = - 1 ;
209- }
210- if ( gestureResponseDistance . top === undefined ) {
211- gestureResponseDistance . top = - 1 ;
212- }
213- if ( gestureResponseDistance . bottom === undefined ) {
214- gestureResponseDistance . bottom = - 1 ;
215- }
216- }
217-
218195 if ( index === 0 ) {
219196 // first screen should always be treated as `push`, it resolves problems with no header animation
220197 // for navigator with first screen as `modal` and the next as `push`
You can’t perform that action at this time.
0 commit comments