mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
Bump the SDK and adopt the new MsgLike timeline item types (#4000)
* Bump the RustSDK to v25.04.09 * Adopt new MsgLike based timeline item structure. * Move the `replyDetails` and `isThreaded` to the `RoomTimelineItemProperties` * Restructure the TimelineItemFactory * Fix line length warning * Rename `msgLikeContent` to `messageLikeContent` wherever possible. * Move the `EventTimelineItem` mocks to the SDK mocks folder.
This commit is contained in:
@@ -17,7 +17,6 @@ enum RoomTimelineItemFixtures {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "", displayName: "Jacob"),
|
||||
content: .init(body: "That looks so good!"),
|
||||
properties: RoomTimelineItemProperties(isEdited: true)),
|
||||
@@ -27,7 +26,6 @@ enum RoomTimelineItemFixtures {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "", displayName: "Helena"),
|
||||
content: .init(body: "Let’s get lunch soon! New salad place opened up 🥗. When are y’all free? 🤗"),
|
||||
properties: RoomTimelineItemProperties(reactions: [
|
||||
@@ -39,7 +37,6 @@ enum RoomTimelineItemFixtures {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "", displayName: "Helena"),
|
||||
content: .init(body: "I can be around on Wednesday. How about some 🌮 instead? Like https://www.tortilla.co.uk/"),
|
||||
properties: RoomTimelineItemProperties(reactions: [
|
||||
@@ -59,7 +56,6 @@ enum RoomTimelineItemFixtures {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "", displayName: "Helena"),
|
||||
content: .init(body: "Wow, cool. Ok, lets go the usual place tomorrow?! Is that too soon? Here’s the menu, let me know what you want it’s on me!"),
|
||||
properties: RoomTimelineItemProperties(orderedReadReceipts: [ReadReceipt(userID: "alice", formattedTimestamp: nil)])),
|
||||
@@ -69,7 +65,6 @@ enum RoomTimelineItemFixtures {
|
||||
isOutgoing: true,
|
||||
isEditable: true,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "", displayName: "Bob"),
|
||||
content: .init(body: "And John's speech was amazing!")),
|
||||
TextRoomTimelineItem(id: .event(uniqueID: .init("RoomTimelineItemFixtures.default.5"),
|
||||
@@ -78,7 +73,6 @@ enum RoomTimelineItemFixtures {
|
||||
isOutgoing: true,
|
||||
isEditable: true,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "", displayName: "Bob"),
|
||||
content: .init(body: "New home office set up!"),
|
||||
properties: RoomTimelineItemProperties(reactions: AggregatedReaction.mockReactions,
|
||||
@@ -92,7 +86,6 @@ enum RoomTimelineItemFixtures {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "", displayName: "Helena"),
|
||||
content: .init(body: "",
|
||||
formattedBody: AttributedStringBuilder(mentionBuilder: MentionBuilder())
|
||||
@@ -276,7 +269,6 @@ private extension TextRoomTimelineItem {
|
||||
isOutgoing: senderDisplayName == "Alice",
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "", displayName: senderDisplayName),
|
||||
content: .init(body: text))
|
||||
}
|
||||
@@ -295,7 +287,6 @@ private extension AudioRoomTimelineItem {
|
||||
isOutgoing: isOutgoing,
|
||||
isEditable: isOutgoing,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: isOutgoing ? "@alice:matrix.org" : "@bob:matrix.org"),
|
||||
content: .init(filename: "audio.mp3",
|
||||
caption: caption,
|
||||
@@ -314,7 +305,6 @@ private extension FileRoomTimelineItem {
|
||||
isOutgoing: isOutgoing,
|
||||
isEditable: isOutgoing,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: isOutgoing ? "@alice:matrix.org" : "@bob:matrix.org"),
|
||||
content: .init(filename: "file.pdf",
|
||||
caption: caption,
|
||||
@@ -332,7 +322,6 @@ private extension ImageRoomTimelineItem {
|
||||
isOutgoing: isOutgoing,
|
||||
isEditable: isOutgoing,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: isOutgoing ? "@alice:matrix.org" : "@bob:matrix.org"),
|
||||
content: .init(filename: "image.jpg",
|
||||
caption: caption,
|
||||
@@ -349,7 +338,6 @@ private extension VideoRoomTimelineItem {
|
||||
isOutgoing: isOutgoing,
|
||||
isEditable: isOutgoing,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: isOutgoing ? "@alice:matrix.org" : "@bob:matrix.org"),
|
||||
content: .init(filename: "video.mp4",
|
||||
caption: caption,
|
||||
@@ -366,7 +354,6 @@ private extension VoiceMessageRoomTimelineItem {
|
||||
isOutgoing: isOutgoing,
|
||||
isEditable: isOutgoing,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: isOutgoing ? "@alice:matrix.org" : "@bob:matrix.org"),
|
||||
content: .init(filename: "message.ogg",
|
||||
duration: 10,
|
||||
|
||||
Reference in New Issue
Block a user