-
-
Notifications
You must be signed in to change notification settings - Fork 45
Backup code error when not matching criteria #3164
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
Conversation
📝 WalkthroughWalkthroughThe update modifies the Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
| } | ||
| } | ||
|
|
||
| binding.connectBackupCodeErrorMessage.setVisibility(!backupCode1.isEmpty() && !isValid ? View.VISIBLE : View.GONE); |
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.
we can just do errorText not empty check here ?
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.
even better to have a method like this - https://github.com/dimagi/commcare-android/blob/master/app/src/org/commcare/fragments/personalId/PersonalIdPhotoCaptureFragment.java#L152
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.
We don't want to show any error message before user starts typing, so check for empty.
Also, you are correct to have separate method when its confirmed that there is error/no-error from multiple places. In this case, unnecessarily checks have to be made, with method overhead.
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.
We don't want to show any error message before user starts typing, so check for empty.
why would errorText be non empty in that case ? What I am suggesting here is to tie the visibility to errorText itself and then set or clear errorText if we need to clear the error.
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.
validateBackupCodeInputs() can also do the same thing i guess
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.
Agree, my bad, corrected
Technical Summary
https://dimagi.atlassian.net/browse/QA-7824
Labels and Review