Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3386167
D14037.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D14037.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D14037: [native] Show version unsupported when opened QR screen
Attached
Detach File
Event Timeline
Log In to Comment