-
Notifications
You must be signed in to change notification settings - Fork 109
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 modal contents overlapping screen lock pin #2692 #2874
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2874 +/- ##
===========================================
- Coverage 74.30% 74.28% -0.03%
===========================================
Files 1530 1532 +2
Lines 36524 36550 +26
Branches 7054 7058 +4
===========================================
+ Hits 27140 27150 +10
- Misses 5698 5714 +16
Partials 3686 3686 ☔ View full report in Codecov by Sentry. |
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks! Some remarks / questions
app/src/main/AndroidManifest.xml
Outdated
<activity | ||
android:name="io.element.android.features.lockscreen.impl.unlock.activity.PinUnlockActivity" | ||
android:configChanges="screenSize|screenLayout|orientation|keyboardHidden|keyboard|navigation|uiMode"/> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be moved to an new Android Manifest in the lockscreen:impl module?
.fillMaxSize() | ||
.background(MaterialTheme.colorScheme.background), | ||
.fillMaxSize() | ||
.background(MaterialTheme.colorScheme.background), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to find a solution to avoid such change
lockScreenService.lockState.collect { state -> | ||
if (state == LockScreenLockState.Locked) { | ||
startActivity(PinUnlockActivity.newIntent(this@MainActivity)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is working, but can we try to use only things from the api module?
Maybe expose a getIntent(): Intent?
api and do nothing when null is returned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok for me to use impl
in the app
module as it's the glue, but I can still expose something in the EntryPoint
if u prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
lockScreenEntryPoint.nodeBuilder(this, buildContext) | ||
.target(LockScreenEntryPoint.Target.Unlock) | ||
.build() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that Target.Unlock
can be removed, since it's not used anymore.
Same for LockScreenFlowNode.NavTarget.Unlock
and PinUnlockNode.Inputs
since isInAppUnlock
will always be false.
setContent { | ||
ElementTheme { | ||
val state = presenter.present() | ||
PinUnlockView(state = state, isInAppUnlock = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't isInAppUnlock
be set to true
here? The parameter is always false
in production code (i.e. not counting preview, can you double check please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, isInAppUnlock
is true
when used for accessing the pin settings here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks. Strange that I missed on it during the first review.
a19f69a
to
73905fa
Compare
Quality Gate failedFailed conditions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, tested OK right now!
@bmarty should we handle the SonarCloud failure? |
Type of change
Content
Extract PinUnlock to a separate Activity so we are sure it's always rendered on top of everything else.
Motivation and context
Closes #2692
Screenshots / GIFs
Tests
Tested devices
Checklist