Page MenuHomePhabricator

D11849.id39715.diff
No OneTemporary

D11849.id39715.diff

diff --git a/native/account/registration/registration-terms.react.js b/native/account/registration/registration-terms.react.js
--- a/native/account/registration/registration-terms.react.js
+++ b/native/account/registration/registration-terms.react.js
@@ -67,6 +67,27 @@
}
}, [register, userSelections, clearCachedSelections]);
+ const { navigation } = props;
+ React.useEffect(() => {
+ if (!registrationInProgress) {
+ return undefined;
+ }
+ navigation.setOptions({
+ gestureEnabled: false,
+ headerLeft: null,
+ });
+ const removeListener = navigation.addListener('beforeRemove', e => {
+ e.preventDefault();
+ });
+ return () => {
+ navigation.setOptions({
+ gestureEnabled: true,
+ headerLeft: undefined,
+ });
+ removeListener();
+ };
+ }, [navigation, registrationInProgress]);
+
const styles = useStyles(unboundStyles);
const termsNotice = (
diff --git a/native/flow-typed/npm/@react-navigation/core_v6.x.x.js b/native/flow-typed/npm/@react-navigation/core_v6.x.x.js
--- a/native/flow-typed/npm/@react-navigation/core_v6.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/core_v6.x.x.js
@@ -1373,7 +1373,7 @@
+headerTitleContainerStyle: AnimatedViewStyleProp,
+headerTintColor: string,
+headerTitleAllowFontScaling: boolean,
- +headerLeft: NavHeaderLeftProps => React$Node,
+ +headerLeft: null | (NavHeaderLeftProps => React$Node),
+headerLeftContainerStyle: AnimatedViewStyleProp,
+headerRight: NavHeaderRightProps => React$Node,
+headerRightContainerStyle: AnimatedViewStyleProp,

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 25, 10:35 PM (11 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2702390
Default Alt Text
D11849.id39715.diff (1 KB)

Event Timeline