-
Notifications
You must be signed in to change notification settings - Fork 29
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: blank lists or flickering on Home Destinations - wrong lazyListStates [WPB-14276] #3627
fix: blank lists or flickering on Home Destinations - wrong lazyListStates [WPB-14276] #3627
Conversation
…tates [WPB-14276]
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/candidate #3627 +/- ##
=====================================================
- Coverage 45.36% 45.35% -0.01%
=====================================================
Files 471 471
Lines 15843 15845 +2
Branches 2655 2655
=====================================================
Hits 7187 7187
- Misses 7883 7885 +2
Partials 773 773
Continue to review full report in Codecov by Sentry.
|
Built wire-android-staging-compat-pr-3627.apk is available for download |
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.
works great!
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
When we navigate around screens sometimes the conversations are not visible until we scroll the list manually.
It looks like there are three different scenarios:
-the full list disappears for a moment when navigating back
-the list blinks quickly and then again blinks quickly when scrolling
-the list doesn't blink but then it disappears when scrolling
Causes (Optional)
Each scrollable screen from "home" graph in theory has its own
LazyListState
, but each view for its own purposes gets it through thecurrentLazyListState
. Now, when app executes navigation and changes thecurrentNavigationItem
, if the screen that's being closed still needs to recompose during the transition animation or quickly before that, then it again gets theLazyListState
for itself usingcurrentLazyListState
but now it returns theLazyListState
for the new screen that's being navigated to, becausecurrentNavigationItem
is already changed, so it recomposes with wrongLazyListState
.Solutions
Make each screen in the "home" graph to always and only use its dedicated
LazyListState
.Thanks to that, it's finally possible to make
HomeStateHolder
not beingremember
ed with keycurrentNavigationItem
thus recreated each time the app navigates, but instead there is only one instance of it remembered and the same one is used in each screen from "home" graph.Testing
How to Test
Attachments (Optional)
Screen_recording_20241113_151711.mp4
fixed.mp4
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
.