Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Add support for properly dealing with incorrect passwords #1672

Merged
merged 6 commits into from
Jan 20, 2022

Conversation

msfjarvis
Copy link
Member

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates

📜 Description

  • Update PasswordDialog to support showing an error, to submit on error, and request focus on the edit text
  • Adds support for a max of 3 retries in DecryptActivityV2 for incorrect passwords

💡 Motivation and Context

Improves UX for incorrect passwords which currently force the app to crash.

💚 How did you test it?

Enter incorrect passwords

📝 Checklist

  • I formatted the code ./gradlew spotlessApply
  • I reviewed submitted code
  • I added a CHANGELOG entry if applicable

@msfjarvis msfjarvis requested a review from a team as a code owner January 20, 2022 18:27
@msfjarvis msfjarvis added this to the v2.0.0 milestone Jan 20, 2022
@msfjarvis msfjarvis added A-PGPainless Area: PGPainless-backed PGP A-UI-UX Area: General UI/UX concerns labels Jan 20, 2022
@msfjarvis msfjarvis force-pushed the hs/2022-01-20/incorrect-password-handling branch from 8e848f0 to 1c02a9b Compare January 20, 2022 18:44
@Skrilltrax
Copy link
Member

Btw we can probably do emit instead of tryEmit by using DialogFragment's lifecycle and then using a coroutine scope from it. That would make the emit suspending. Is there any reason we do tryEmit in a loop instead?

@msfjarvis
Copy link
Member Author

Btw we can probably do emit instead of tryEmit by using DialogFragment's lifecycle and then using a coroutine scope from it. That would make the emit suspending. Is there any reason we do tryEmit in a loop instead?

Seem to remember that emit can throw? I'm fine with either option, can fix this in a follow-up.

@msfjarvis msfjarvis merged commit 78a90aa into develop Jan 20, 2022
@msfjarvis msfjarvis deleted the hs/2022-01-20/incorrect-password-handling branch January 20, 2022 18:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-PGPainless Area: PGPainless-backed PGP A-UI-UX Area: General UI/UX concerns
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants