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: app lock dialog blinking (WPB-5610) #2464

Merged
merged 3 commits into from
Nov 24, 2023

Conversation

alexandreferris
Copy link
Contributor

@alexandreferris alexandreferris commented Nov 23, 2023

BugWPB-5610 [Android] Applock dialog disappears immediately when on second accound


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

AppLock Dialog was blinking when being enabled/disabled when on a second account.

Causes (Optional)

The observer for loading current user and its changes was not being propagated correctly due to it only being activated when we needed to do another sync (e.g.: app close then open)

Solutions

As decided with @MohamadJaara we will only be showing the app lock dialog on the said account itself (not on other accounts that are logged in on the device).

We did two things:

Create a currentUserId variable in the view model to be updated whenever there is a change and listen to this change on a LaunchedEffect on the UI so it reloads the initial sync needed to show/hide the dialogs.

Dependencies (Optional)

Needs releases with:

Testing

How to Test

  • Have 2 accounts (1 in a team, 1 non-team)
  • Stay active on non-team account
  • receive the event of enable app lock
  • NON-TEAM account : nothing should be displayed
  • when changing to TEAM account, app lock dialog should be displayed.

@alexandreferris alexandreferris changed the base branch from develop to release/candidate November 23, 2023 16:36
@alexandreferris alexandreferris self-assigned this Nov 23, 2023
@alexandreferris alexandreferris requested review from a team, yamilmedina, borichellow, MohamadJaara, mchenani and ohassine and removed request for a team November 23, 2023 16:36
@AndroidBob
Copy link
Collaborator

Build 1964 succeeded.

The build produced the following APK's:

Copy link
Contributor

Test Results

692 tests   692 ✔️  7m 51s ⏱️
  98 suites      0 💤
  98 files        0

Results for commit cd716b6.

Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@alexandreferris alexandreferris enabled auto-merge (squash) November 24, 2023 10:48
@AndroidBob
Copy link
Collaborator

Build 1983 succeeded.

The build produced the following APK's:

@alexandreferris alexandreferris merged commit 18552c4 into release/candidate Nov 24, 2023
7 checks passed
@alexandreferris alexandreferris deleted the fix/app_lock_dialog_blinking branch November 24, 2023 11:26
Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants