Page MenuHomePhabricator

D14037.diff
No OneTemporary

D14037.diff

diff --git a/native/navigation/deep-links-context-provider.react.js b/native/navigation/deep-links-context-provider.react.js
--- a/native/navigation/deep-links-context-provider.react.js
+++ b/native/navigation/deep-links-context-provider.react.js
@@ -25,6 +25,7 @@
import {
errorMessageIsInvalidCSAT,
usingCommServicesAccessToken,
+ usingRestoreFlow,
} from 'lib/utils/services-utils.js';
import {
@@ -32,7 +33,10 @@
SecondaryDeviceQRCodeScannerRouteName,
} from './route-names.js';
import { useSelector } from '../redux/redux-utils.js';
-import { useOnFirstLaunchEffect } from '../utils/hooks.js';
+import {
+ useShowVersionUnsupportedAlert,
+ useOnFirstLaunchEffect,
+} from '../utils/hooks.js';
type DeepLinksContextType = {
+setCurrentLinkUrl: SetState<?string>,
@@ -97,6 +101,7 @@
const { getAuthMetadata } = identityContext;
const invalidTokenLogOut = useInvalidCSATLogOut();
+ const showVersionUnsupportedAlert = useShowVersionUnsupportedAlert(false);
const loggedIn = useSelector(isLoggedIn);
const dispatchActionPromise = useDispatchActionPromise();
const validateLink = useVerifyInviteLink(keyserverOverride);
@@ -146,10 +151,21 @@
});
}
} else if (parsedData.type === 'qr-code') {
+ if (!usingRestoreFlow) {
+ showVersionUnsupportedAlert();
+ return;
+ }
navigation.navigate(SecondaryDeviceQRCodeScannerRouteName);
}
})();
- }, [currentLink, getAuthMetadata, loggedIn, navigation, invalidTokenLogOut]);
+ }, [
+ currentLink,
+ getAuthMetadata,
+ loggedIn,
+ navigation,
+ invalidTokenLogOut,
+ showVersionUnsupportedAlert,
+ ]);
React.useEffect(() => {
const secret = inviteLinkSecret.current;

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 30, 3:30 AM (20 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2599382
Default Alt Text
D14037.diff (1 KB)

Event Timeline