Thread Decorator (#1686)

* just added the isThreaded property to message based events

* done but I should add a bunch of tests for images and videos and locations

* handling for image and videos, but locations might need to be double checked

* code improvement

* better tests and removed code that is not used, we need to fix first the appearence of replies

* bubble style is solved, we now need plain style

* also added plain style

* better handling for bubble style

* rounded corner only for bubbles in location

* fix for wrong aspect ratio in replies

* all changes done

* better testing

* swift format

* changelog

* PR comments and rebase.

* Simplify corner radius on location timeline view.

---------

Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
Mauro
2023-09-15 12:58:30 +02:00
committed by GitHub
parent 7cbb064464
commit 63fc9ad410
42 changed files with 618 additions and 116 deletions

View File

@@ -257,6 +257,7 @@ class LoggingTests: XCTestCase {
timestamp: "",
isOutgoing: false,
isEditable: false,
isThreaded: false,
sender: .init(id: "sender"),
content: .init(body: "TextString", formattedBody: AttributedString(textAttributedString)))
let noticeAttributedString = "NoticeAttributed"
@@ -264,6 +265,7 @@ class LoggingTests: XCTestCase {
timestamp: "",
isOutgoing: false,
isEditable: false,
isThreaded: false,
sender: .init(id: "sender"),
content: .init(body: "NoticeString", formattedBody: AttributedString(noticeAttributedString)))
let emoteAttributedString = "EmoteAttributed"
@@ -271,24 +273,28 @@ class LoggingTests: XCTestCase {
timestamp: "",
isOutgoing: false,
isEditable: false,
isThreaded: false,
sender: .init(id: "sender"),
content: .init(body: "EmoteString", formattedBody: AttributedString(emoteAttributedString)))
let imageMessage = ImageRoomTimelineItem(id: .init(timelineID: "myimagemessage"),
timestamp: "",
isOutgoing: false,
isEditable: false,
isThreaded: false,
sender: .init(id: "sender"),
content: .init(body: "ImageString", source: MediaSourceProxy(url: .picturesDirectory, mimeType: "image/gif"), thumbnailSource: nil))
let videoMessage = VideoRoomTimelineItem(id: .random,
timestamp: "",
isOutgoing: false,
isEditable: false,
isThreaded: false,
sender: .init(id: "sender"),
content: .init(body: "VideoString", duration: 0, source: nil, thumbnailSource: nil))
let fileMessage = FileRoomTimelineItem(id: .random,
timestamp: "",
isOutgoing: false,
isEditable: false,
isThreaded: false,
sender: .init(id: "sender"),
content: .init(body: "FileString", source: nil, thumbnailSource: nil, contentType: nil))