fix: flashlist scrollto behaviour v8 backport#3608
Merged
Conversation
Backports two MessageFlashList scroll-to fixes from develop: 1. Quoted-message scroll-to no longer snaps back to the bottom when the target is already in the loaded messageSet. The scrollToIndex call is re-issued inside nested requestAnimationFrames so the second one reconciles after MVCP's pending scroll fires. 2. Initial scroll-to-first-unread no longer loses the race against the mount-time scrollToEnd. Channel now exposes a hasPendingInitialTargetLoad predicate that MessageFlashList checks before running its automatic scrollToEnd on mount / autoscrollToRecent changes. Key order differs minimally from develop because V8 still enforces the sort-keys ESLint rule that develop has dropped; the patch is otherwise identical. (cherry picked from commit bc8eb82)
szuperaz
approved these changes
May 19, 2026
Contributor
SDK Size
|
|
No changelog generated for the current changes on this pull request. |
6 tasks
isekovanic
added a commit
that referenced
this pull request
May 21, 2026
β¦3609) ## π― Goal In the pursuit of finding a better workaround for [this PR](#3608), I believe I've found the underlying cause (or part of it at least) for why the issue actually happens. The technical details are in [this upstream PR](Shopify/flash-list#2290) for `FlashList`. ## π Implementation details <!-- Provide a description of the implementation --> ## π¨ UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## π§ͺ Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## βοΈ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
π― Goal
This is a backport of this PR towards V8. All details are in its description.
π Implementation details
π¨ UI Changes
iOS
Android
π§ͺ Testing
βοΈ Checklist
developbranch