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.
Could you explain what was happening before this line was added.
There was a problem hiding this comment.
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