Repository navigation
feat: paginator refactor compatibility - #3888
Merged
Merged
Conversation
Contributor
SDK Size
|
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
Adapt to
stream-chat10.0.0-rc.24, which includes stream-chat-js#1926 (the message paginator now places every page itself, andmessageSetToAddToIfDoesNotExistis gone).That PR renamed
messagePaginator.lastMessage/lastMessageAttolatestMessage/latestMessageAt. RN still read the old names, which are nowundefined. As a result, every channel preview showed "No messages yet", and thread list rows lost the last reply's avatar and time.π Implementation details
stream-chatto^10.0.0-rc.24inpackageand the example apps.latestMessage/latestMessageAtinuseChannelPreviewData,ThreadListItem,useMarkRead,MessageListandMessageFlashList.selectMessagesForChannelsreturned 24 messages per channel (RowNum < 25) instead of 25. The client reads a page shorter than requested as the start of the channel, so older history could stop loading past the cached messages. It now returns 25.headItemsbecomesanchoredHeadItems.Channeltest spies onrequestChannelState, since the paginator no longer goes throughchannel.query.hasMoreHead: true, since a complete short first page is now correctly the newest one.ai-migration-v9-to-v10.mdandv10-breaking-changes.mdnow uselatestMessageand describe thechannel.querybehaviour correctly. The link to the LLC's breaking-changes list is fixed.No breaking changes in RN's own API.
π¨ UI Changes
Channel list previews and thread list rows show the latest message / reply again instead of "No messages yet".
π§ͺ Testing
yarn lint,yarn build,yarn typecheckandyarn test:unit(2243 passed).βοΈ Checklist
developbranch