Page MenuHomePhorge

D14202.1768786959.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D14202.1768786959.diff

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

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)

Event Timeline