Page MenuHomePhabricator

D5394.diff
No OneTemporary

D5394.diff

diff --git a/native/chat/chat-list.react.js b/native/chat/chat-list.react.js
--- a/native/chat/chat-list.react.js
+++ b/native/chat/chat-list.react.js
@@ -75,7 +75,7 @@
componentDidMount() {
const tabNavigation: ?TabNavigationProp<
'Chat',
- > = this.props.navigation.dangerouslyGetParent();
+ > = this.props.navigation.getParent();
invariant(tabNavigation, 'ChatNavigator should be within TabNavigator');
tabNavigation.addListener('tabPress', this.onTabPress);
}
@@ -83,7 +83,7 @@
componentWillUnmount() {
const tabNavigation: ?TabNavigationProp<
'Chat',
- > = this.props.navigation.dangerouslyGetParent();
+ > = this.props.navigation.getParent();
invariant(tabNavigation, 'ChatNavigator should be within TabNavigator');
tabNavigation.removeListener('tabPress', this.onTabPress);
}
diff --git a/native/chat/chat-thread-list.react.js b/native/chat/chat-thread-list.react.js
--- a/native/chat/chat-thread-list.react.js
+++ b/native/chat/chat-thread-list.react.js
@@ -157,11 +157,11 @@
const chatNavigation: ?ChatNavigationProp<
'ChatThreadList',
- > = this.props.navigation.dangerouslyGetParent();
+ > = this.props.navigation.getParent();
invariant(chatNavigation, 'ChatNavigator should be within TabNavigator');
const tabNavigation: ?TabNavigationProp<
'Chat',
- > = chatNavigation.dangerouslyGetParent();
+ > = chatNavigation.getParent();
invariant(tabNavigation, 'ChatNavigator should be within TabNavigator');
tabNavigation.addListener('tabPress', this.onTabPress);
@@ -173,11 +173,11 @@
const chatNavigation: ?ChatNavigationProp<
'ChatThreadList',
- > = this.props.navigation.dangerouslyGetParent();
+ > = this.props.navigation.getParent();
invariant(chatNavigation, 'ChatNavigator should be within TabNavigator');
const tabNavigation: ?TabNavigationProp<
'Chat',
- > = chatNavigation.dangerouslyGetParent();
+ > = chatNavigation.getParent();
invariant(tabNavigation, 'ChatNavigator should be within TabNavigator');
tabNavigation.removeListener('tabPress', this.onTabPress);
diff --git a/native/chat/settings/thread-settings.react.js b/native/chat/settings/thread-settings.react.js
--- a/native/chat/settings/thread-settings.react.js
+++ b/native/chat/settings/thread-settings.react.js
@@ -1084,9 +1084,7 @@
const { navigation } = props;
React.useEffect(() => {
- const tabNavigation: ?TabNavigationProp<
- 'Chat',
- > = navigation.dangerouslyGetParent();
+ const tabNavigation: ?TabNavigationProp<'Chat'> = navigation.getParent();
invariant(tabNavigation, 'ChatNavigator should be within TabNavigator');
const onTabPress = () => {
diff --git a/native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js b/native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js
--- a/native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js
@@ -870,8 +870,8 @@
+goBack: () => void,
+isFocused: () => boolean,
+canGoBack: () => boolean,
- +dangerouslyGetParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,
- +dangerouslyGetState: () => NavigationState,
+ +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,
+ +getState: () => NavigationState,
+addListener: <EventName: $Keys<
{| ...EventMap, ...EventMapCore<State> |},
>>(
diff --git a/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js b/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js
--- a/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js
@@ -870,8 +870,8 @@
+goBack: () => void,
+isFocused: () => boolean,
+canGoBack: () => boolean,
- +dangerouslyGetParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,
- +dangerouslyGetState: () => NavigationState,
+ +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,
+ +getState: () => NavigationState,
+addListener: <EventName: $Keys<
{| ...EventMap, ...EventMapCore<State> |},
>>(
diff --git a/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js b/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js
--- a/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js
@@ -870,8 +870,8 @@
+goBack: () => void,
+isFocused: () => boolean,
+canGoBack: () => boolean,
- +dangerouslyGetParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,
- +dangerouslyGetState: () => NavigationState,
+ +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,
+ +getState: () => NavigationState,
+addListener: <EventName: $Keys<
{| ...EventMap, ...EventMapCore<State> |},
>>(
diff --git a/native/flow-typed/npm/@react-navigation/native_v5.x.x.js b/native/flow-typed/npm/@react-navigation/native_v5.x.x.js
--- a/native/flow-typed/npm/@react-navigation/native_v5.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/native_v5.x.x.js
@@ -870,8 +870,8 @@
+goBack: () => void,
+isFocused: () => boolean,
+canGoBack: () => boolean,
- +dangerouslyGetParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,
- +dangerouslyGetState: () => NavigationState,
+ +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,
+ +getState: () => NavigationState,
+addListener: <EventName: $Keys<
{| ...EventMap, ...EventMapCore<State> |},
>>(
diff --git a/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js b/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js
--- a/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js
@@ -870,8 +870,8 @@
+goBack: () => void,
+isFocused: () => boolean,
+canGoBack: () => boolean,
- +dangerouslyGetParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,
- +dangerouslyGetState: () => NavigationState,
+ +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,
+ +getState: () => NavigationState,
+addListener: <EventName: $Keys<
{| ...EventMap, ...EventMapCore<State> |},
>>(

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 10, 6:28 AM (8 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2845991
Default Alt Text
D5394.diff (6 KB)

Event Timeline