Add support for adding/editing/removing media captions. (#3547)

* Add support for editing media captions.

* Add composer snapshots.

* PR comment.
This commit is contained in:
Doug
2024-11-21 18:18:27 +00:00
committed by GitHub
parent c081e538b4
commit 7e1476d973
21 changed files with 178 additions and 61 deletions
@@ -65,7 +65,15 @@ struct TimelineItemMenuActionProvider {
}
if item.isEditable {
actions.append(.edit)
if let messageItem = item as? EventBasedMessageTimelineItemProtocol, messageItem.supportsMediaCaption {
if messageItem.hasMediaCaption {
actions.append(contentsOf: [.editCaption, .removeCaption])
} else {
actions.append(.addCaption)
}
} else if !(item is VoiceMessageRoomTimelineItem) {
actions.append(.edit)
}
}
if canCurrentUserPin, let eventID = item.id.eventID {