fix: Manipulate sort_timestamp to not be 0q#8055
Draft
Hocuri wants to merge 7 commits intolink2xt/no-sort-below-last-seenfrom
Draft
fix: Manipulate sort_timestamp to not be 0q#8055Hocuri wants to merge 7 commits intolink2xt/no-sort-below-last-seenfrom
Hocuri wants to merge 7 commits intolink2xt/no-sort-below-last-seenfrom
Conversation
It is not clear now what this is testing. Golden test shows messages ordered incorrectly according to the timestamps, they should be ordered the other way round. Comment talks about fetching from mvbox and inbox in paralell which is a rare case that could have happened if one message is left in the inbox and the other message is a chat message moved to mvbox. We never download anything that is not moved to the target folder. The test also resides in "verified chats" tests which are all legacy tests we kept after replacing the concept of verified/protected chats with key contacts in 2.x.
We know which message was added from the return value of receive_imf(). It may be that the first chat in the chatlist is not the one where the message was received if there is a pinned chat or if just received message is old.
…ginning We set timestamp of this info message to 0 to make it always appear in the beginning of the chat. To avoid new chats being sorted to the end of the chatlist, we ignore such 0 and use chat creation timestamp when sorting the chatlist.
This is to avoid sorting incoming messages that are slightly in the past above system messages about SecureJoin. SecureJoin messages are timed according to smeared timestamp, so even in the local tests they are in the future by a few seconds.
Collaborator
|
I did something similar at 95a347e, need to test if it works. The difference is that the message will still have the lowest timestamp even if new message arrives with lower timestamp than |
95a347e to
3671857
Compare
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.
Alternative to deltachat/deltachat-android#4326.
Not sure if I like it; it seems kind of hacky (and would at least need a comment).