-
Notifications
You must be signed in to change notification settings - Fork 72
Fix auto login #3773
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
base: main
Are you sure you want to change the base?
Fix auto login #3773
Conversation
On first time login, `account` will be null, then NPE crash happens.
Prevents a situation: from home screen to login screen, but then immediately goes back to home screen.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3773 +/- ##
=========================================
- Coverage 30.0% 25.3% -4.8%
+ Complexity 915 815 -100
=========================================
Files 287 297 +10
Lines 15409 16080 +671
Branches 2703 2810 +107
=========================================
- Hits 4628 4072 -556
- Misses 10215 11494 +1279
+ Partials 566 514 -52
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| account.type, | ||
| accountManager.peekAuthToken(account, AUTH_TOKEN_TYPE), | ||
| ) | ||
| secureSharedPreference.deleteCredentials() |
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.
Could you explain what was happening before this line was added.
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.
Without this 1 line change, and while the other new changes are implemented:
When user logs out, app navigates to login page but then immiediately goes back to the hope page, because all this time, the user credentials stays even after log out where it should have been deleted.
|
@FikriMilano could you add some tests to cover the updates made on this PR |
IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes #3772
works.webm
Engineer Checklist
strings.xmlfile./gradlew spotlessApplyand./gradlew spotlessCheckto check my code follows the project's style guideCode Reviewer Checklist
strings.xmlfile