Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33304434
D14202.1768786959.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D14202.1768786959.diff
View Options
diff --git a/native/account/qr-auth/primary-device-qr-auth-context-provider.js b/native/account/qr-auth/primary-device-qr-auth-context-provider.js
--- a/native/account/qr-auth/primary-device-qr-auth-context-provider.js
+++ b/native/account/qr-auth/primary-device-qr-auth-context-provider.js
@@ -62,6 +62,11 @@
const identityContext = React.useContext(IdentityClientContext);
invariant(identityContext, 'identity context not set');
+ const backupExists = useSelector(
+ state => !!state.backupStore.latestBackupInfo,
+ );
+ const [backupNotReady, setBackupNotReady] = React.useState(false);
+
React.useEffect(() => {
return () => {
if (timeout.current) {
@@ -258,11 +263,27 @@
return;
}
- await processDeviceListUpdate();
+ if (backupExists) {
+ await processDeviceListUpdate();
+ } else {
+ setBackupNotReady(true);
+ }
},
- [processDeviceListUpdate],
+ [processDeviceListUpdate, backupExists],
);
+ React.useEffect(() => {
+ if (backupExists && backupNotReady && connectingInProgress) {
+ void processDeviceListUpdate();
+ setBackupNotReady(false);
+ }
+ }, [
+ backupExists,
+ backupNotReady,
+ connectingInProgress,
+ processDeviceListUpdate,
+ ]);
+
const onRemoveSecondaryDevice = React.useCallback(async () => {
if (!secondaryDeviceID.current) {
console.log('No secondary device to remove');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 1:42 AM (7 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5953829
Default Alt Text
D14202.1768786959.diff (1 KB)
Attached To
Mode
D14202: [native] Wait for backup before processing QR code
Attached
Detach File
Event Timeline
Log In to Comment