Skip to content
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

Fix ReleaseNotesActivity displayed after login. #7061

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Sep 7, 2022

Ensure the state is up to date, when we will request it later with withState{}

Type of change

  • Feature
  • Bugfix. Not released so no changelog
  • Technical
  • Other :

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#L123 state.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

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

Ensure the state is up to date, when we will request it later with withState{}
@bmarty bmarty requested a review from fedrunov September 7, 2022 13:03
@ericdecanini
Copy link
Contributor

Should we have an issue to go back to this so we don't forget? (I can write this if you want)

Copy link
Contributor

@fedrunov fedrunov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@bmarty bmarty merged commit a743cf2 into develop Sep 8, 2022
@bmarty bmarty deleted the feature/bma/no_ReleaseNotesActivity_on_login branch September 8, 2022 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants