mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Add support for rendering media captions in the timeline. (#3429)
This commit is contained in:
+17
@@ -24,3 +24,20 @@ protocol EventBasedMessageTimelineItemProtocol: EventBasedTimelineItemProtocol {
|
||||
var contentType: EventBasedMessageTimelineItemContentType { get }
|
||||
var isThreaded: Bool { get }
|
||||
}
|
||||
|
||||
extension EventBasedMessageTimelineItemProtocol {
|
||||
var hasMediaCaption: Bool {
|
||||
switch contentType {
|
||||
case .audio(let content):
|
||||
content.caption != nil
|
||||
case .file(let content):
|
||||
content.caption != nil
|
||||
case .image(let content):
|
||||
content.caption != nil
|
||||
case .video(let content):
|
||||
content.caption != nil
|
||||
case .emote, .notice, .text, .location, .voice:
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user