-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show dialog if backup is too new #4721
Conversation
resolves #4709
For testing paste a string starting with DCBACKUP3 like "DCBACKUP3:fooo" in the add second device qr scanning dialog |
await openAlertDialog({ | ||
message: tx('multidevice_receiver_needs_update'), | ||
}) | ||
callback?.() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this some TypeScript magic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nvm, I looked it up. I'm guessing this is checking if the callback is defined before invoking it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A general comment about this useProcessQR()
function. It looks like it's only used in one place (PseudoListItem.tsx
), which doesn't pass in a callback, so maybe we should just remove all the callback-invoking code? (I can make a PR for that so this PR isn't blocked).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used multiple times and sometimes witha callback:
deltachat-desktop/packages/frontend/src/components/dialogs/SetupMultiDevice/ReceiveBackupDialog.tsx
Line 52 in e5d32b6
await processQr(accountId, data, onDone) |
or
await processQr(accountId, data, onDone) |
Which is for closing a dialog etc.
resolves #4709