-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui): Fix latest_edit_json for live messages
This was a regression introduced in f0d9860. `latest_edit_json` was first set by the call to `EventTimelineItem::with_content()`. It was overwritten in the next section because of the `if let EventTimelineItemKind::Remote(remote_event)` that uses `item` instead of `new_item`. It means that the updated `RemoteEventTimelineItem` inside`new_item` was replaced by the outdated one inside `item`, so `latest_edit_json` goes back to its previous value. I believe that part of why that went unnoticed is that the code looks more complicated due to the need to set an inner field, so I decided to change the API and move `with_encryption_info` to `EventTimelineItem`, which makes the code look cleaner. Signed-off-by: Kévin Commaille <[email protected]>
- Loading branch information
Showing
7 changed files
with
24 additions
and
15 deletions.
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
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
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