Skip to content
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

Merged
merged 2 commits into from
Mar 1, 2025
Merged

Show dialog if backup is too new #4721

merged 2 commits into from
Mar 1, 2025

Conversation

nicodh
Copy link
Member

@nicodh nicodh commented Mar 1, 2025

resolves #4709

@nicodh
Copy link
Member Author

nicodh commented Mar 1, 2025

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?.()
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

@ralphtheninja ralphtheninja Mar 1, 2025

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).

Copy link
Member Author

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:


or
await processQr(accountId, data, onDone)

Which is for closing a dialog etc.

@nicodh nicodh merged commit fddd8de into main Mar 1, 2025
12 checks passed
@nicodh nicodh deleted the show-backup-too-new-message branch March 1, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adapt to BackupTooNew QR codes
2 participants