-
Notifications
You must be signed in to change notification settings - Fork 45
refactor(perf): improves changes to applock non blocking check to improve startup time (WPB-22876) #4545
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
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4545 +/- ##
===========================================
+ Coverage 48.46% 48.49% +0.02%
===========================================
Files 575 575
Lines 19803 19807 +4
Branches 3313 3313
===========================================
+ Hits 9598 9605 +7
+ Misses 9190 9187 -3
Partials 1015 1015
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
@claude review |
PR Review: Refactor App Lock Check to Non-Blocking FlowSummaryThis PR successfully removes the blocking ✅ Positive AspectsPerformance Improvements
Code Quality
|
| initialSync() | ||
| isAppLockSet() |
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.
initialSync() collects indefinitely, which prevents isAppLockSet() from ever being called.
We can launch them in separate coroutines
viewModelScope.launch {
initialSync()
}
viewModelScope.launch {
isAppLockSet()
}
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.
good catch! addressed, we also had a race condition there as per Claude comment too, so I'm now launching this separately.
|
|
|
||
| init { | ||
| viewModelScope.launch { initialSync() } | ||
| viewModelScope.launch { |
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.
will this cause the home screen to flash for a split second untill this check is done?



https://wearezeta.atlassian.net/browse/WPB-22876
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
Change/remove the usage of
isUserAppLockSet()checks from blocking to using the flow alternative and use as a state property.Solutions
Use the flow version
isAppLockPasscodeSetFlow()and collect/update the state property.Needs releases with:
Testing
Test Coverage (Optional)
Attachments (Optional)
With app lock changes to flow:
Without (current dev):
Summary (by AI on the results)
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.