Skip to content

Conversation

isekovanic
Copy link
Contributor

@isekovanic isekovanic commented Oct 15, 2025

🎯 Goal

With some weird order of events, pagination might end up being broken during pruning.

To reproduce the issue:

  • Render a MessageList
  • Paginate past the maximumMessageLimit window (i.e 120 if the window is 100)
  • Start receiving new messages (triggering pruning)
  • Stop receiving messages
  • Scroll up, trigger pagination (it will work this time)
  • Scroll back down, start receiving messages again
  • Stop receiving messages again
  • Scroll up, try to paginate again

Pagination will now be broken because the length already exists in the pagination trackers.

For now, we can simply reset them - in the long run it would be great to simply rewrite parts of this code. There are many better ways to write guards against double queries.

🛠 Implementation details

🎨 UI Changes

iOS
Before After
Android
Before After

🧪 Testing

☑️ Checklist

  • I have signed the Stream CLA (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

@Stream-SDK-Bot
Copy link
Contributor

SDK Size

title develop branch diff status
js_bundle_size 291 KB 291 KB 0 B 🟢

@isekovanic isekovanic merged commit d06d32c into develop Oct 15, 2025
6 checks passed
@isekovanic isekovanic deleted the fix/pagination-breaking-during-pruning branch October 15, 2025 13:29
@github-actions github-actions bot mentioned this pull request Oct 15, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants