Fix slow unlock on iOS by disabling privacy screen immediately#9884
Fix slow unlock on iOS by disabling privacy screen immediately#9884brian-c11 wants to merge 1 commit intoente-io:mainfrom
Conversation
Fix slow unlock on iOS by disabling the privacy/blur screen immediately after Face ID authentication succeeds instead of waiting for the lock screen to be popped. Before: The blur overlay persisted briefly after successful authentication, causing a noticeable delay before showing the codes. After: Call PrivacyScreen.instance.disable() right after authentication succeeds, before calling didUnlock(), to immediately remove the blur.
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d68e2b2ed0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| _isShowingLockScreen = false; | ||
| if (result) { | ||
| lastAuthenticatingTime = DateTime.now().millisecondsSinceEpoch; | ||
| await PrivacyScreen.instance.disable(); |
There was a problem hiding this comment.
Keep privacy protection enabled after unlock
Calling PrivacyScreen.instance.disable() on every successful unlock turns off the privacy-screen feature globally, but this flow never re-enables it. LockScreenSettings only enables privacy mode from saved preferences during setup, so users with hide-app-content enabled lose app-switcher/screenshot protection after their first unlock until they restart or manually toggle the setting.
Useful? React with 👍 / 👎.
| _isShowingLockScreen = false; | ||
| if (result) { | ||
| lastAuthenticatingTime = DateTime.now().millisecondsSinceEpoch; | ||
| await PrivacyScreen.instance.disable(); |
There was a problem hiding this comment.
Guard privacy-screen disable on desktop unlocks
This unconditional disable() call runs on all platforms, but elsewhere desktop is explicitly excluded from privacy-screen operations. In desktop environments where privacy_screen lacks an implementation, disable() can throw; because it is awaited before didUnlock(), the catch path logs and exits without unlocking, leaving users on the lock screen even after successful authentication.
Useful? React with 👍 / 👎.
Description
Fix slow unlock on iOS when using Face ID (device lock). The blur/privacy screen was persisting briefly after successful authentication before showing the codes.
Changes
await PrivacyScreen.instance.disable()immediately after successful authentication in_showLockScreen(), before callingdidUnlock()Issue
Fixes #4749
Testing
Screenshots
Before: Noticeable delay between Face ID success and codes appearing
After: Codes appear instantly when keyboard pops up