From bf86b168d71c40384221f931137f4a68e802df59 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Thu, 21 Nov 2024 09:25:32 +0000 Subject: [PATCH] feat(timeline): mark media events as editable in the timeline (#4303) 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. --- crates/matrix-sdk-ui/src/timeline/event_item/mod.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/matrix-sdk-ui/src/timeline/event_item/mod.rs b/crates/matrix-sdk-ui/src/timeline/event_item/mod.rs index b90613d53d0..a10f9fc95a6 100644 --- a/crates/matrix-sdk-ui/src/timeline/event_item/mod.rs +++ b/crates/matrix-sdk-ui/src/timeline/event_item/mod.rs @@ -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()