refactor: remove timesmearing#8226
Conversation
8379b9d to
4f919ce
Compare
4f919ce to
2b97913
Compare
2b97913 to
5e61bba
Compare
There was a problem hiding this comment.
The problem with removing time smearing is that recently we started to sort messages almost purely by Date, so if messages having the same Date value (e.g. forwarded messages) are delivered reordered, they will be sorted wrongly. Maybe it makes sense to add some auto-incremented Chat-Message-Index header? Also this way, if a backup is transferred to a device with clock a bit in the past, messages sent from it will be ordered correctly.
EDIT: Probably it's better to be solved by ordering by References and In-Reply-To.
|
idea was to make things simpler, less discussions etc. assumption was to try to remove timesmearing as it might be superfluous today - it was initially introduced to force sorting in classic mua. that assumtion seems to be wrong. timesmearing still seems to be needed. surely things can be done differently. however, at this point, before adding new sorting criteria or sort using a tree of replies, add new complexity, new bugs, new work, new discussions: it may be better to keep timesmearing and call it a day. it is comparable few, tested code |
One problem with removing it is that chat name or description may not be applied if it is done twice within the same second:
core/src/receive_imf.rs
Line 3304 in 6fb2f27
Previously the sender increased the timestamp each time, so it was clear which update is the latest, but now the tests that rename the chat multiple times in a row break without
sleep(1).Also had to insert time shift in some "golden" tests because otherwise they become flaky if the messages are sent by different senders and are received not in the order in which they are sent. If the second is the same, they were ordered in reception order, if the second is different they were ordered by timestamp and in the sending order.