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

LockScreen : rework LoggedInFlowNode and Back management #1806

Merged
merged 4 commits into from
Nov 14, 2023

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented Nov 14, 2023

What the PR solves : previously, when the LockScreen was shown, it was replacing the View of LoggedInFlowNode, so all the Children.Views were removed from the composition. It was causing troubles with flow like attach files or take and send picture.

Why it was done like that : because of how the BackHandler is managed by Appyx on the Backstack, the children were receiving the onBackPressed from the activity before I could intercept them. So, even if the app was locked it'd pop the backstack instead of putting the app in background.

The fix : Do not remove the Children from the composition, but instead block the back management directly in the MainActivity.

@ganfra ganfra marked this pull request as ready for review November 14, 2023 20:08
@ganfra ganfra requested a review from a team as a code owner November 14, 2023 20:08
@ganfra ganfra requested review from bmarty and removed request for a team November 14, 2023 20:08
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

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

Comparison is base (3353419) 63.37% compared to head (b4a19b9) 63.38%.

Files Patch % Lines
...c/main/kotlin/io/element/android/x/MainActivity.kt 0.00% 3 Missing ⚠️
...droid/features/lockscreen/api/LockScreenService.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1806   +/-   ##
========================================
  Coverage    63.37%   63.38%           
========================================
  Files         1293     1292    -1     
  Lines        33589    33584    -5     
  Branches      6979     6974    -5     
========================================
  Hits         21288    21288           
+ Misses        9116     9111    -5     
  Partials      3185     3185           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Nov 14, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/tTupSo

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.

Excellent, thanks!

@bmarty bmarty merged commit 6bfb316 into develop Nov 14, 2023
@bmarty bmarty deleted the feature/fga/lock_screen_composition branch November 14, 2023 22:15
Copy link

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

No Coverage information No Coverage information
No Duplication information No Duplication information

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.

2 participants