Skip to content

Commit

Permalink
feat(timeline): mark media events as editable in the timeline (#4303)
Browse files Browse the repository at this point in the history
This PR makes audio, file, image and video messages be editable so that
the timeline signals when it is possible to use #4277/#4300 for editing
captions.
  • Loading branch information
pixlwave authored Nov 21, 2024
1 parent e5ca44b commit bf86b16
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion crates/matrix-sdk-ui/src/timeline/event_item/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,15 @@ impl EventTimelineItem {

match self.content() {
TimelineItemContent::Message(message) => {
matches!(message.msgtype(), MessageType::Text(_) | MessageType::Emote(_))
matches!(
message.msgtype(),
MessageType::Text(_)
| MessageType::Emote(_)
| MessageType::Audio(_)
| MessageType::File(_)
| MessageType::Image(_)
| MessageType::Video(_)
)
}
TimelineItemContent::Poll(poll) => {
poll.response_data.is_empty() && poll.end_event_timestamp.is_none()
Expand Down

0 comments on commit bf86b16

Please sign in to comment.