Add CustomStringConvertible conformances to timeline item contents

This commit is contained in:
Stefan Ceriu
2026-08-13 16:05:23 +03:00
parent b41d801cab
commit 5cb4a2fe5a
2 changed files with 40 additions and 2 deletions
@@ -8,9 +8,22 @@
import Foundation
nonisolated enum TimelineEventContent: Hashable {
nonisolated enum TimelineEventContent: Hashable, CustomStringConvertible {
case message(EventBasedMessageTimelineItemContentType)
case poll(question: String)
case liveLocation
case redacted
var description: String {
switch self {
case .message(let eventBasedMessageTimelineItemContentType):
eventBasedMessageTimelineItemContentType.description
case .poll:
"poll"
case .liveLocation:
"liveLocation"
case .redacted:
"redacted"
}
}
}