Fix ReleaseNotesActivity displayed after login. #7061
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ensure the state is up to date, when we will request it later with withState{}
Type of change
Content
Ensure the state is up to date, else at this point: https://github.com/vector-im/element-android/blob/62e8beadf8c0ece8e56e21b86d9e96c0ec68d3b2/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt#L498 the state is not up to date, and
it.selectedAuthenticationState.description
is null. So at this point https://github.com/vector-im/element-android/blob/16fad63e49eb408a4ccf066341e5b9cd5745fc66/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt#L123state.authenticationDescription
is null and we display ReleaseNotesActivity, if never displayed before.The fix is maybe not the best thing to do, I already had concern about it. But as a quick fix it seems acceptable. I think
OnboardingViewState.selectedAuthenticationState
should be set earlier.Tested OK on my side.
Motivation and context
Screenshots / GIFs
Tests
Tested devices
Checklist