Bump the RustSDK to v1.0.53: adopt latest record based timeline item APIs (#3356)

This commit is contained in:
Stefan Ceriu
2024-10-01 18:50:11 +03:00
committed by GitHub
parent 268d9f7479
commit c79dbe85a0
49 changed files with 776 additions and 2172 deletions
@@ -8,23 +8,14 @@
import Foundation
final class RoomTimelineItemViewState: Identifiable, Equatable, ObservableObject {
static func == (lhs: RoomTimelineItemViewState, rhs: RoomTimelineItemViewState) -> Bool {
lhs.type == rhs.type && lhs.groupStyle == rhs.groupStyle
}
@Published var type: RoomTimelineItemType
@Published var groupStyle: TimelineGroupStyle
/// Contains all the identification info of the item, `timelineID`, `eventID` and `transactionID`
/// Contains all the identification info of the item, `uniqueID`, `eventID` and `transactionID`
var identifier: TimelineItemIdentifier {
type.id
}
/// The `timelineID` of the item, used for the timeline view level identification, do not use for any business logic use `identifier` instead
var id: String {
identifier.timelineID
}
init(type: RoomTimelineItemType, groupStyle: TimelineGroupStyle) {
self.type = type
self.groupStyle = groupStyle
@@ -33,6 +24,19 @@ final class RoomTimelineItemViewState: Identifiable, Equatable, ObservableObject
convenience init(item: RoomTimelineItemProtocol, groupStyle: TimelineGroupStyle) {
self.init(type: .init(item: item), groupStyle: groupStyle)
}
// MARK: - Equatable
static func == (lhs: RoomTimelineItemViewState, rhs: RoomTimelineItemViewState) -> Bool {
lhs.type == rhs.type && lhs.groupStyle == rhs.groupStyle
}
// MARK: Identifiable
/// The `timelineID` of the item, used for the timeline view level identification, do not use for any business logic use `identifier` instead
var id: String {
identifier.uniqueID
}
}
enum RoomTimelineItemType: Equatable {