Skip to content

fix: Prevent message list jumping during pagination updates#3829

Merged
mdecourcy merged 5 commits into
meshtastic:mainfrom
mdecourcy:fix/message-list-scroll-jumping
Nov 27, 2025
Merged

fix: Prevent message list jumping during pagination updates#3829
mdecourcy merged 5 commits into
meshtastic:mainfrom
mdecourcy:fix/message-list-scroll-jumping

Conversation

@mdecourcy

@mdecourcy mdecourcy commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Fixes message list jumping when new messages arrive while the screen is open
  • Adds pagination stability check before triggering auto-scroll

Problem

The message list would sometimes jump erratically when:

  • Receiving an inbound message with the chat screen open
  • Sending a message

This was caused by auto-scroll triggering while pagination was still loading/refreshing items, creating a race condition between scroll animations and pagination updates.

Solution

Added isPagingStable check that monitors all pagination load states (refresh, prepend, append). Auto-scroll now only triggers when pagination is stable, preventing scroll actions during item updates.

@mdecourcy mdecourcy marked this pull request as ready for review November 26, 2025 19:10
@jamesarich jamesarich enabled auto-merge November 26, 2025 19:36
@jamesarich jamesarich added this to the 2.7.8 milestone Nov 26, 2025
@mdecourcy mdecourcy disabled auto-merge November 26, 2025 19:55
@mdecourcy

Copy link
Copy Markdown
Contributor Author

needs more testing

@mdecourcy mdecourcy enabled auto-merge November 26, 2025 20:30
@github-actions github-actions Bot added the bugfix PR tag label Nov 26, 2025
@codecov

codecov Bot commented Nov 26, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.54%. Comparing base (4cecc57) to head (9a5bce9).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...g/meshtastic/feature/messaging/MessageListPaged.kt 0.00% 25 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #3829      +/-   ##
========================================
- Coverage   0.54%   0.54%   -0.01%     
========================================
  Files        386     386              
  Lines      22531   22548      +17     
  Branches    2829    2837       +8     
========================================
  Hits         122     122              
- Misses     22388   22405      +17     
  Partials      21      21              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mdecourcy mdecourcy added this pull request to the merge queue Nov 27, 2025
Merged via the queue into meshtastic:main with commit 9bc1b87 Nov 27, 2025
5 checks passed
@mdecourcy mdecourcy deleted the fix/message-list-scroll-jumping branch November 27, 2025 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants