* Use a Date for the timestamp in all timeline items. * UI test snapshots. * Update snapshots --------- Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
33 lines
794 B
Swift
33 lines
794 B
Swift
//
|
|
// Copyright 2023, 2024 New Vector Ltd.
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
// Please see LICENSE in the repository root for full details.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
struct VoiceMessageRoomTimelineItem: EventBasedMessageTimelineItemProtocol, Equatable {
|
|
let id: TimelineItemIdentifier
|
|
let timestamp: Date
|
|
let isOutgoing: Bool
|
|
let isEditable: Bool
|
|
let canBeRepliedTo: Bool
|
|
let isThreaded: Bool
|
|
let sender: TimelineItemSender
|
|
|
|
let content: AudioRoomTimelineItemContent
|
|
|
|
var replyDetails: TimelineItemReplyDetails?
|
|
|
|
var properties = RoomTimelineItemProperties()
|
|
|
|
var body: String {
|
|
content.caption ?? content.filename
|
|
}
|
|
|
|
var contentType: EventBasedMessageTimelineItemContentType {
|
|
.voice(content)
|
|
}
|
|
}
|