Skip to content

Special text for re-verification after update #8462

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

Merged
merged 1 commit into from
May 24, 2023

Conversation

BillCarsonFr
Copy link
Member

@BillCarsonFr BillCarsonFr commented May 23, 2023

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Fixes #8445

If you have a read only device (not all secrets available):
image

After the migration to rust you will need to re-verify, the text is updated like this in this case
image

Motivation and context

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@BillCarsonFr BillCarsonFr requested a review from bmarty May 23, 2023 11:10
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Just a remark, else LGTM.
(Tests seem to be failing).

@@ -170,6 +171,19 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
}

private fun handleAppStarted() {
// On the first run with rust crypto this would be false
if (!vectorPreferences.isOnRustCrypto()) {
Copy link
Member

Choose a reason for hiding this comment

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

I think you need to test BuildConfig.FLAVOR == "rustCrypto" also:

Suggested change
if (!vectorPreferences.isOnRustCrypto()) {
if (BuildConfig.FLAVOR == "rustCrypto" && !vectorPreferences.isOnRustCrypto()) {

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's ok now, isOnRustCrypto will pass to true only if you run once on the new rust flavor.
If you have a logged in session before that it will store that you had legacy data, and in the check for the popup we do that check:

vectorPreferences.isOnRustCrypto() && vectorPreferences.hadExistingLegacyData()

Copy link
Member

Choose a reason for hiding this comment

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

OK. My point was that the code in the if block will run every time on the KotlinCrypto version. Not a big deal of course.

}

if (BuildConfig.FLAVOR == "rustCrypto") {
vectorPreferences.setIsOnRustCrypto(true)
Copy link
Member

Choose a reason for hiding this comment

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

This line could then be moved at the end of the previous if block.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

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.

Sometimes after migrating to rust crypto, the App requires users to re-verify the device
2 participants