mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +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:
@@ -121,7 +121,6 @@ class LoggingTests: XCTestCase {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "sender"),
|
||||
content: .init(body: "TextString", formattedBody: AttributedString(textAttributedString)))
|
||||
let noticeAttributedString = "NoticeAttributed"
|
||||
@@ -130,7 +129,6 @@ class LoggingTests: XCTestCase {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "sender"),
|
||||
content: .init(body: "NoticeString", formattedBody: AttributedString(noticeAttributedString)))
|
||||
let emoteAttributedString = "EmoteAttributed"
|
||||
@@ -139,7 +137,6 @@ class LoggingTests: XCTestCase {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "sender"),
|
||||
content: .init(body: "EmoteString", formattedBody: AttributedString(emoteAttributedString)))
|
||||
let imageMessage = ImageRoomTimelineItem(id: .randomEvent,
|
||||
@@ -147,7 +144,6 @@ class LoggingTests: XCTestCase {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "sender"),
|
||||
content: .init(filename: "ImageString",
|
||||
caption: "ImageString",
|
||||
@@ -158,7 +154,6 @@ class LoggingTests: XCTestCase {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "sender"),
|
||||
content: .init(filename: "VideoString",
|
||||
caption: "VideoString",
|
||||
@@ -169,7 +164,6 @@ class LoggingTests: XCTestCase {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "sender"),
|
||||
content: .init(filename: "FileString",
|
||||
caption: "FileString",
|
||||
|
||||
@@ -16,7 +16,6 @@ final class TextBasedRoomTimelineTests: XCTestCase {
|
||||
isOutgoing: true,
|
||||
isEditable: true,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: UUID().uuidString),
|
||||
content: .init(body: "Test"))
|
||||
XCTAssertEqual(timelineItem.additionalWhitespaces(), timestamp.formattedTime().count + 1)
|
||||
@@ -29,7 +28,6 @@ final class TextBasedRoomTimelineTests: XCTestCase {
|
||||
isOutgoing: true,
|
||||
isEditable: true,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: UUID().uuidString),
|
||||
content: .init(body: "Test"))
|
||||
XCTAssertEqual(timelineItem.additionalWhitespaces(), timestamp.formattedTime().count + 1)
|
||||
@@ -42,7 +40,6 @@ final class TextBasedRoomTimelineTests: XCTestCase {
|
||||
isOutgoing: true,
|
||||
isEditable: true,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: UUID().uuidString),
|
||||
content: .init(body: "Test"))
|
||||
timelineItem.properties.isEdited = true
|
||||
@@ -57,7 +54,6 @@ final class TextBasedRoomTimelineTests: XCTestCase {
|
||||
isOutgoing: true,
|
||||
isEditable: true,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: UUID().uuidString),
|
||||
content: .init(body: "Test"))
|
||||
timelineItem.properties.isEdited = true
|
||||
|
||||
@@ -300,7 +300,6 @@ class TimelineMediaPreviewViewModelTests: XCTestCase {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "", displayName: "Sally Sanderson"),
|
||||
content: .init(filename: "Amazing image.jpeg",
|
||||
caption: "A caption goes right here.",
|
||||
@@ -312,7 +311,6 @@ class TimelineMediaPreviewViewModelTests: XCTestCase {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: ""),
|
||||
content: .init(filename: "Super video.mp4",
|
||||
videoInfo: .mockVideo,
|
||||
@@ -323,7 +321,6 @@ class TimelineMediaPreviewViewModelTests: XCTestCase {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: ""),
|
||||
content: .init(filename: "Important file.pdf",
|
||||
source: try? .init(url: .mockMXCFile, mimeType: "document/pdf"),
|
||||
|
||||
@@ -553,7 +553,6 @@ private extension TextRoomTimelineItem {
|
||||
isOutgoing: sender == "bob",
|
||||
isEditable: sender == "bob",
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: "@\(sender):server.com", displayName: sender),
|
||||
content: .init(body: text),
|
||||
properties: RoomTimelineItemProperties(reactions: reactions, orderedReadReceipts: addReadReceipts))
|
||||
@@ -573,7 +572,6 @@ private extension TextRoomTimelineItem {
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
canBeRepliedTo: true,
|
||||
isThreaded: false,
|
||||
sender: .init(id: ""),
|
||||
content: .init(body: "Hello, World!"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user