Files
element-x-ios/ElementX/Sources/Services/Timeline/TimelineItems/Items/Other/CallNotificationRoomTimelineItem.swift
Valere Fedronic 0f72fe3511 Add support for active call item rendering in timeline (#5775)
* feat(timeline): Add support for active call item rendering in timeline

* Update active call as per design (show raw count of members)

* fixup project files

* revert unexpected generated mocks change

* code review

* Record preview snapshots

* revert changes on project.yml

* post rebase fix
2026-07-22 15:13:46 +01:00

32 lines
1009 B
Swift

//
// Copyright 2025 Element Creations Ltd.
// Copyright 2024-2025 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
// Please see LICENSE files in the repository root for full details.
//
import Foundation
nonisolated struct CallNotificationRoomTimelineItem: RoomTimelineItemProtocol, Equatable {
let id: TimelineItemIdentifier
let timestamp: Date
let sender: TimelineItemSender
let isDM: Bool
let isVoiceCall: Bool
/// Represents the state of the call notification - either tombstoned (ended) or active (ongoing)
enum CallState: Equatable {
/// A tombstoned/ended call notification
case tombstoned(isDeclinedByMe: Bool, isDeclined: Bool)
/// An active/ongoing call notification
case active(activeMembers: [String],
isJoined: Bool,
callStartTimestamp: Date?)
}
let callState: CallState
var properties = RoomTimelineItemProperties()
}