-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch older messages on scrolling up in message list #264
Merged
Merged
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5f9253b
msglist [nfc]: Assimilate findMessageWithId to our style
gnprice 353071e
msglist [nfc]: Mark _applyChangesToMessage static; return void, not d…
gnprice 38abb1f
msglist: Use zero for no-op numAfter in fetch
gnprice e69eb1f
msglist [nfc]: Pull out constant for fetch-batch size
gnprice 6634bee
msglist [nfc]: Cut done todos; add link for another
gnprice b91de7d
msglist [nfc]: Pull out _MessageSequence from MessageListView
gnprice e9b0579
algorithm [nfc]: Pull out a generic binarySearchByKey
gnprice 60273ac
msglist [nfc]: Introduce MessageListItem
gnprice 961c889
msglist: Show when we've reached the oldest message in the history
gnprice 3665af8
msglist test: Use AllMessagesNarrow, so that all messages are consistent
gnprice 7a7d80c
msglist test: Use realistic API responses in widget tests, too
gnprice d46523e
msglist test [nfc]: Use shared store/connection variables in widget t…
gnprice 18bb0c6
msglist test [nfc]: Make tests more explicit about the messages in list
gnprice bccaead
msglist: Fetch older messages on scrolling up
gnprice File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to check my understanding: when
items
starts having multiple items with the same message ID (a date separator and recipient header, in addition toMessageListMessageItem
), this method will need to be replaced, right, because it assumes there is just one item per message ID.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. It'll need some adjustments and I suppose some renamings for clarification, but I think the core logic will actually continue to work fine: the key is that
So when the comparison function sees some item that has the right message ID but isn't a message item, it can just say those compare before the key.