11diff -Naur node_modules/@react-navigation/stack/src/index.tsx src/vendor/index.tsx
2- --- node_modules/@react-navigation/stack/src/index.tsx 2020-01-07 15:54:09 .000000000 +0100
3- +++ src/vendor/index.tsx 2020-01-07 16:06:06 .000000000 +0100
2+ --- node_modules/@react-navigation/stack/src/index.tsx 2020-01-09 03:40:24 .000000000 +0100
3+ +++ src/vendor/index.tsx 2020-01-09 03:40:42 .000000000 +0100
44@@ -3,11 +3,6 @@
55 import * as TransitionSpecs from './TransitionConfigs/TransitionSpecs';
66 import * as TransitionPresets from './TransitionConfigs/TransitionPresets';
@@ -28,7 +28,7 @@ diff -Naur node_modules/@react-navigation/stack/src/index.tsx src/vendor/index.t
2828 StackHeaderTitleProps,
2929 StackCardInterpolatedStyle,
3030diff -Naur node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx src/vendor/navigators/createStackNavigator.tsx
31- --- node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx 2020-01-07 15:54:09 .000000000 +0100
31+ --- node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx 2020-01-09 03:40:24 .000000000 +0100
3232+++ src/vendor/navigators/createStackNavigator.tsx 1970-01-01 01:00:00.000000000 +0100
3333@@ -1,77 +0,0 @@
3434- import * as React from 'react';
@@ -109,8 +109,8 @@ diff -Naur node_modules/@react-navigation/stack/src/navigators/createStackNaviga
109109- typeof StackNavigator
110110- >(StackNavigator);
111111diff -Naur node_modules/@react-navigation/stack/src/types.tsx src/vendor/types.tsx
112- --- node_modules/@react-navigation/stack/src/types.tsx 2020-01-07 15:54:09 .000000000 +0100
113- +++ src/vendor/types.tsx 2020-01-07 16:06:06 .000000000 +0100
112+ --- node_modules/@react-navigation/stack/src/types.tsx 2020-01-09 03:40:24 .000000000 +0100
113+ +++ src/vendor/types.tsx 2020-01-09 03:40:42 .000000000 +0100
114114@@ -8,13 +8,28 @@
115115 } from 'react-native';
116116 import { EdgeInsets } from 'react-native-safe-area-context';
@@ -255,8 +255,8 @@ diff -Naur node_modules/@react-navigation/stack/src/types.tsx src/vendor/types.t
255255
256256 export type StackNavigationConfig = {
257257diff -Naur node_modules/@react-navigation/stack/src/views/Header/Header.tsx src/vendor/views/Header/Header.tsx
258- --- node_modules/@react-navigation/stack/src/views/Header/Header.tsx 2020-01-07 15:54:09 .000000000 +0100
259- +++ src/vendor/views/Header/Header.tsx 2020-01-07 16:06:09 .000000000 +0100
258+ --- node_modules/@react-navigation/stack/src/views/Header/Header.tsx 2020-01-09 03:40:24 .000000000 +0100
259+ +++ src/vendor/views/Header/Header.tsx 2020-01-09 03:40:42 .000000000 +0100
260260@@ -1,11 +1,13 @@
261261 import * as React from 'react';
262262- import { StackActions } from '@react-navigation/routers';
@@ -325,8 +325,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Header/Header.tsx src/
325325+
326326+ export default Header;
327327diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx src/vendor/views/Header/HeaderBackButton.tsx
328- --- node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx 2020-01-07 15:54:09 .000000000 +0100
329- +++ src/vendor/views/Header/HeaderBackButton.tsx 2020-01-07 16:06:06 .000000000 +0100
328+ --- node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx 2020-01-09 03:40:24 .000000000 +0100
329+ +++ src/vendor/views/Header/HeaderBackButton.tsx 2020-01-09 03:40:42 .000000000 +0100
330330@@ -8,9 +8,9 @@
331331 StyleSheet,
332332 LayoutChangeEvent,
@@ -339,8 +339,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderBackButto
339339
340340 type Props = StackHeaderLeftButtonProps;
341341diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx src/vendor/views/Header/HeaderBackground.tsx
342- --- node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx 2020-01-07 15:54:09 .000000000 +0100
343- +++ src/vendor/views/Header/HeaderBackground.tsx 2020-01-07 16:06:06 .000000000 +0100
342+ --- node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx 2020-01-09 03:40:24 .000000000 +0100
343+ +++ src/vendor/views/Header/HeaderBackground.tsx 2020-01-09 03:40:42 .000000000 +0100
344344@@ -1,6 +1,6 @@
345345 import * as React from 'react';
346346 import { Animated, StyleSheet, Platform, ViewProps } from 'react-native';
@@ -350,9 +350,9 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderBackgroun
350350 export default function HeaderBackground({ style, ...rest }: ViewProps) {
351351 const { colors } = useTheme();
352352diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx src/vendor/views/Header/HeaderContainer.tsx
353- --- node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx 2020-01-07 15:54:09 .000000000 +0100
354- +++ src/vendor/views/Header/HeaderContainer.tsx 2020-01-07 16:06:06 .000000000 +0100
355- @@ -1,16 +1,13 @@
353+ --- node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx 2020-01-09 03:40:24 .000000000 +0100
354+ +++ src/vendor/views/Header/HeaderContainer.tsx 2020-01-09 03:42:01 .000000000 +0100
355+ @@ -1,11 +1,7 @@
356356 import * as React from 'react';
357357 import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
358358- import {
@@ -366,26 +366,28 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderContainer
366366 import { EdgeInsets } from 'react-native-safe-area-context';
367367
368368 import Header from './Header';
369- import { forStatic } from '../../TransitionConfigs/HeaderStyleInterpolators';
369+ @@ -14,6 +10,7 @@
370+ forNoAnimation,
371+ } from '../../TransitionConfigs/HeaderStyleInterpolators';
370372 import {
371373+ Route,
372374 Layout,
373375 Scene,
374376 StackHeaderStyleInterpolator,
375- @@ -93 ,9 +90 ,7 @@
377+ @@ -94 ,9 +91 ,7 @@
376378 insets,
377379 scene,
378380 previous,
379381- navigation: scene.descriptor.navigation as StackNavigationProp<
380382- ParamListBase
381383- >,
382- + navigation: scene.descriptor.navigation as StackNavigationProp,
383- styleInterpolator: isHeaderStatic ? forStatic : styleInterpolator,
384- };
385-
384+ + navigation: scene.descriptor.navigation as StackNavigationProp,
385+ styleInterpolator:
386+ mode === 'float'
387+ ? isHeaderStatic
386388diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx src/vendor/views/Header/HeaderSegment.tsx
387- --- node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx 2020-01-07 15:54:09 .000000000 +0100
388- +++ src/vendor/views/Header/HeaderSegment.tsx 2020-01-07 16:06:06 .000000000 +0100
389+ --- node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx 2020-01-09 03:40:24 .000000000 +0100
390+ +++ src/vendor/views/Header/HeaderSegment.tsx 2020-01-09 03:40:42 .000000000 +0100
389391@@ -8,7 +8,7 @@
390392 ViewStyle,
391393 } from 'react-native';
@@ -405,8 +407,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.t
405407 };
406408
407409diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx src/vendor/views/Header/HeaderTitle.tsx
408- --- node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx 2020-01-07 15:54:09 .000000000 +0100
409- +++ src/vendor/views/Header/HeaderTitle.tsx 2020-01-07 16:06:06 .000000000 +0100
410+ --- node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx 2020-01-09 03:40:24 .000000000 +0100
411+ +++ src/vendor/views/Header/HeaderTitle.tsx 2020-01-09 03:40:42 .000000000 +0100
410412@@ -1,6 +1,6 @@
411413 import * as React from 'react';
412414 import { Animated, StyleSheet, Platform, TextProps } from 'react-native';
@@ -416,8 +418,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx
416418 type Props = TextProps & {
417419 tintColor?: string;
418420diff -Naur node_modules/@react-navigation/stack/src/views/Stack/Card.tsx src/vendor/views/Stack/Card.tsx
419- --- node_modules/@react-navigation/stack/src/views/Stack/Card.tsx 2020-01-07 15:54:09 .000000000 +0100
420- +++ src/vendor/views/Stack/Card.tsx 2020-01-07 16:06:06 .000000000 +0100
421+ --- node_modules/@react-navigation/stack/src/views/Stack/Card.tsx 2020-01-09 03:40:24 .000000000 +0100
422+ +++ src/vendor/views/Stack/Card.tsx 2020-01-09 03:40:42 .000000000 +0100
421423@@ -483,7 +483,7 @@
422424 pointerEvents="none"
423425 />
@@ -428,8 +430,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Stack/Card.tsx src/ven
428430 <CardAnimationContext.Provider value={animationContext}>
429431 {children}
430432diff -Naur node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx src/vendor/views/Stack/CardContainer.tsx
431- --- node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx 2020-01-07 15:54:09 .000000000 +0100
432- +++ src/vendor/views/Stack/CardContainer.tsx 2020-01-07 16:06:06 .000000000 +0100
433+ --- node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx 2020-01-09 03:40:24 .000000000 +0100
434+ +++ src/vendor/views/Stack/CardContainer.tsx 2020-01-09 03:40:42 .000000000 +0100
433435@@ -1,11 +1,17 @@
434436 import * as React from 'react';
435437 import { Animated, View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
@@ -461,8 +463,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Stack/CardContainer.ts
461463 >
462464 <View style={styles.container}>
463465diff -Naur node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx src/vendor/views/Stack/CardStack.tsx
464- --- node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx 2020-01-07 15:54:09 .000000000 +0100
465- +++ src/vendor/views/Stack/CardStack.tsx 2020-01-07 16:06:06 .000000000 +0100
466+ --- node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx 2020-01-09 03:40:24 .000000000 +0100
467+ +++ src/vendor/views/Stack/CardStack.tsx 2020-01-09 03:40:42 .000000000 +0100
466468@@ -11,8 +11,7 @@
467469 import { EdgeInsets } from 'react-native-safe-area-context';
468470 // eslint-disable-next-line import/no-unresolved
@@ -482,8 +484,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx sr
482484 StackHeaderMode,
483485 StackCardMode,
484486diff -Naur node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx src/vendor/views/Stack/StackView.tsx
485- --- node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx 2020-01-07 15:54:09 .000000000 +0100
486- +++ src/vendor/views/Stack/StackView.tsx 2020-01-07 16:06:06 .000000000 +0100
487+ --- node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx 2020-01-09 03:40:24 .000000000 +0100
488+ +++ src/vendor/views/Stack/StackView.tsx 2020-01-09 03:44:43 .000000000 +0100
487489@@ -1,8 +1,11 @@
488490 import * as React from 'react';
489491 import { Platform } from 'react-native';
@@ -547,32 +549,27 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx sr
547549 this.setState(state => ({
548550 routes: state.replacingRouteKeys.length
549551 ? state.routes.filter(r => !state.replacingRouteKeys.includes(r.key))
550- @@ -283,15 +305,19 @@
552+ @@ -282,10 +304,15 @@
553+ // If a route exists in state, trigger a pop
551554 // This will happen in when the route was closed from the card component
552555 // e.g. When the close animation triggered from a gesture ends
553- // For the cleanup, the card needs to call this function again from its componentDidUpdate
554556- navigation.dispatch({
555557- ...StackActions.pop(),
556558- source: route.key,
557559- target: state.key,
558- - });
559560+ // @ts-ignore
560561+ navigation.dispatch(StackActions.pop({ key: route.key }));
561- } else {
562- // Otherwise, the animation was triggered due to a route removal
563- // In this case, we need to clean up any state tracking the route and pop it immediately
564-
562+ + } else {
565563+ // While closing route we need to point to the previous one assuming that
566564+ // this previous one in routes array
567565+ const index = this.state.routes.findIndex(r => r.key === route.key);
566+ +
568567+ this.handleTransitionComplete({
569568+ route: this.state.routes[Math.max(index - 1, 0)],
570- + });
571- +
572- // @ts-ignore
573- this.setState(state => ({
574- routes: state.routes.filter(r => r.key !== route.key),
575- @@ -308,22 +334,26 @@
569+ });
570+ }
571+
572+ @@ -300,22 +327,26 @@
576573 private handleTransitionStart = (
577574 { route }: { route: Route<string> },
578575 closing: boolean
0 commit comments