Add infinite scroll to inbox contacts list#19339
Merged
ornicar merged 8 commits intolichess-org:masterfrom Feb 8, 2026
Merged
Conversation
Backend: - Add moreContacts method in MsgApi.scala for cursor-based pagination - Add /inbox/contacts route with before timestamp parameter - Add moreContacts controller method in Msg.scala Frontend: - Add loadMoreContacts network function - Add loadingContacts and canGetMoreContacts state in MsgCtrl - Add loadMoreContacts method for lazy loading - Add scroll event listener to contacts container - Add loading spinner CSS Closes lichess-org#11985
6cb21df to
614352b
Compare
Collaborator
|
That looks good but there's a problem when loading a conversation from page > 1. The conversation XHR response contains the first page of conversations, ensuring that the current one is included: It replaces the list of conversations, reverting the pagination to page 1. |
next 2 lines do the same thing
When opening a conversation from page > 1, preserve the existing paginated contacts list instead of replacing it with the server's page 1 response. Merge new contacts into the existing list. Also remove redundant moreContacts controller method since home() already handles the before param.
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.
Backend:
Frontend:
Closes #11985