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: applock toggle state when enforced and responding to changes [WPB-5751] #2566

Merged

Conversation

AndroidBob
Copy link
Collaborator

@AndroidBob AndroidBob commented Jan 4, 2024

BugWPB-5751 [Android] App lock toggle is green in settings, when enforced by team

Cherry pick from the original PR:


⚠️ Conflicts during cherry-pick:
app/src/main/kotlin/com/wire/android/ui/home/appLock/set/SetLockScreenViewModel.kt
app/src/test/kotlin/com/wire/android/ui/home/appLock/set/SetLockScreenViewModelTest.kt


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
    • 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

Currently, the app lock toggle is visible with ON value but just disabled when the app lock is enforced by the team admin. According to the designs in that case the toggle should be hidden and only ON text should be visible.
Also when the user is on that screen and the team admin changes the setting, it doesn't get updated automatically but only after closing and opening it again.

Solutions

Change the appearance of the app lock row so that if it's enforced by the team admin then the toggle is not shown but just a text is visible.
Use the updated use case to observe the editable app lock value changes instead of getting just a single value.

Dependencies (Optional)

Needs releases with:

Testing

How to Test

Open settings screen and change the app lock team settings on team admin panel.

Attachments (Optional)

applock_toggle_changes.mp4

PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. .

@AndroidBob AndroidBob added the cherry-pick PR is cherry-picking changes from another banch label Jan 4, 2024
Copy link
Contributor

github-actions bot commented Jan 4, 2024

Test Results

741 tests  ±0   741 ✅ ±0   12m 6s ⏱️ -39s
102 suites ±0     0 💤 ±0 
102 files   ±0     0 ❌ ±0 

Results for commit e5b3cab. ± Comparison against base commit 52decf5.

♻️ This comment has been updated with latest results.

@AndroidBob
Copy link
Collaborator Author

Build 2455 failed.

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (52decf5) 41.24% compared to head (e5b3cab) 41.23%.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #2566      +/-   ##
=============================================
- Coverage      41.24%   41.23%   -0.02%     
  Complexity      1138     1138              
=============================================
  Files            361      361              
  Lines          13190    13191       +1     
  Branches        1739     1741       +2     
=============================================
- Hits            5440     5439       -1     
- Misses          7219     7221       +2     
  Partials         531      531              
Files Coverage Δ
.../com/wire/android/feature/DisableAppLockUseCase.kt 100.00% <100.00%> (ø)
...wire/android/ui/home/settings/SettingsViewModel.kt 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52decf5...e5b3cab. Read the comment docs.

Copy link
Contributor

github-actions bot commented Jan 4, 2024

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

@AndroidBob
Copy link
Collaborator Author

Build 2457 succeeded.

The build produced the following APK's:

@saleniuk saleniuk requested review from a team, typfel, borichellow, MohamadJaara, Garzas and saleniuk and removed request for a team January 4, 2024 13:31
Copy link
Contributor

github-actions bot commented Jan 8, 2024

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

@AndroidBob
Copy link
Collaborator Author

Build 2474 succeeded.

The build produced the following APK's:

…-updates-cherry-pick' into fix/applock-toggle-and-observing-updates-cherry-pick
Copy link
Contributor

github-actions bot commented Jan 8, 2024

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

@AndroidBob
Copy link
Collaborator Author

Build 2477 succeeded.

The build produced the following APK's:

@saleniuk saleniuk added this pull request to the merge queue Jan 8, 2024
Merged via the queue into develop with commit e82429b Jan 8, 2024
15 checks passed
@saleniuk saleniuk deleted the fix/applock-toggle-and-observing-updates-cherry-pick branch January 8, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick PR is cherry-picking changes from another banch size/XS
Projects
None yet
5 participants