Refactor theTimelineItemIdentifier handling; stop relying on optional EventOrTransactionIds and be explicit when setting composer modes from the draft service.
This commit is contained in:
@@ -116,7 +116,7 @@ class LoggingTests: XCTestCase {
|
||||
func validateTimelineContentIsRedacted() throws {
|
||||
// Given timeline items that contain text
|
||||
let textAttributedString = "TextAttributed"
|
||||
let textMessage = TextRoomTimelineItem(id: .random,
|
||||
let textMessage = TextRoomTimelineItem(id: .randomEvent,
|
||||
timestamp: "",
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
@@ -125,7 +125,7 @@ class LoggingTests: XCTestCase {
|
||||
sender: .init(id: "sender"),
|
||||
content: .init(body: "TextString", formattedBody: AttributedString(textAttributedString)))
|
||||
let noticeAttributedString = "NoticeAttributed"
|
||||
let noticeMessage = NoticeRoomTimelineItem(id: .random,
|
||||
let noticeMessage = NoticeRoomTimelineItem(id: .randomEvent,
|
||||
timestamp: "",
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
@@ -134,7 +134,7 @@ class LoggingTests: XCTestCase {
|
||||
sender: .init(id: "sender"),
|
||||
content: .init(body: "NoticeString", formattedBody: AttributedString(noticeAttributedString)))
|
||||
let emoteAttributedString = "EmoteAttributed"
|
||||
let emoteMessage = EmoteRoomTimelineItem(id: .random,
|
||||
let emoteMessage = EmoteRoomTimelineItem(id: .randomEvent,
|
||||
timestamp: "",
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
@@ -142,7 +142,7 @@ class LoggingTests: XCTestCase {
|
||||
isThreaded: false,
|
||||
sender: .init(id: "sender"),
|
||||
content: .init(body: "EmoteString", formattedBody: AttributedString(emoteAttributedString)))
|
||||
let imageMessage = ImageRoomTimelineItem(id: .init(uniqueID: "myimagemessage"),
|
||||
let imageMessage = ImageRoomTimelineItem(id: .randomEvent,
|
||||
timestamp: "",
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
@@ -153,7 +153,7 @@ class LoggingTests: XCTestCase {
|
||||
caption: "ImageString",
|
||||
source: MediaSourceProxy(url: .picturesDirectory, mimeType: "image/gif"),
|
||||
thumbnailSource: nil))
|
||||
let videoMessage = VideoRoomTimelineItem(id: .random,
|
||||
let videoMessage = VideoRoomTimelineItem(id: .randomEvent,
|
||||
timestamp: "",
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
@@ -165,7 +165,7 @@ class LoggingTests: XCTestCase {
|
||||
duration: 0,
|
||||
source: nil,
|
||||
thumbnailSource: nil))
|
||||
let fileMessage = FileRoomTimelineItem(id: .random,
|
||||
let fileMessage = FileRoomTimelineItem(id: .randomEvent,
|
||||
timestamp: "",
|
||||
isOutgoing: false,
|
||||
isEditable: false,
|
||||
|
||||
Reference in New Issue
Block a user