-
Notifications
You must be signed in to change notification settings - Fork 287
refactor(timeline): use TimelineAction::from_event
to create a RepliedToEvent
struct
#5057
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
Conversation
a6ee830
to
d74cc9d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5057 +/- ##
=======================================
Coverage 85.90% 85.90%
=======================================
Files 325 325
Lines 35943 35917 -26
=======================================
- Hits 30876 30855 -21
+ Misses 5067 5062 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d74cc9d
to
abd9146
Compare
abd9146
to
d93678a
Compare
…e item If the replied-to event is an aggregation, the `RepliedToEvent::try_from_timeline_event` will now return `Ok(None)`, and the caller may handle this as they please. In the FFI layer, this will be filled with an error message indicating that the event is unsupported.
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 some general questions, otherwise lgtm, thank you!
|
||
None => TimelineItemContent::MsgLike(MsgLikeContent::redacted()), | ||
let sender = event.sender().to_owned(); | ||
let action = TimelineAction::from_event( |
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.
Super nice 👌 .. although TimelineAction
might no longer be the right name here.
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.
On another note: I wonder if populating those previously empty relations will create any issues 🤔
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.
Do you have in mind any particular issue it could cause?
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.
I initially thought of reply fallbacks showing up in reply items if it's a reply to a reply but honestly I don't have enough context around this to know if that's even a possibility. Figured it's better to just ask.
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.
There's nothing that comes to mind, but we can watch out on this part during the next few releases 👍
One more bullet item of #4823. The reply preview will now support all the types that are supported by the timeline, by default, and the UTD hook will also be called when creating a
RepliedToEvent
when the replied-to event is a UTD.On top of #5046, so draft. Only the latest commit has been added on top of the aforementioned PR.