Thread decoration: update preview with new changes
This commit is contained in:
parent
74c2d6a9d6
commit
0fb93d1cca
2 changed files with 20 additions and 4 deletions
|
|
@ -707,7 +707,7 @@ private fun ContentToPreviewWithReply() {
|
|||
body = "A long text which will be displayed on several lines and" +
|
||||
" hopefully can be manually adjusted to test different behaviors."
|
||||
),
|
||||
inReplyTo = aInReplyToReady(replyContent, true),
|
||||
inReplyTo = aInReplyToReady(replyContent),
|
||||
groupPosition = TimelineItemGroupPosition.First,
|
||||
),
|
||||
isHighlighted = false,
|
||||
|
|
@ -729,7 +729,8 @@ private fun ContentToPreviewWithReply() {
|
|||
content = aTimelineItemImageContent().copy(
|
||||
aspectRatio = 5f
|
||||
),
|
||||
inReplyTo = aInReplyToReady(replyContent, false),
|
||||
inReplyTo = aInReplyToReady(replyContent),
|
||||
isThreaded = true,
|
||||
groupPosition = TimelineItemGroupPosition.Last,
|
||||
),
|
||||
isHighlighted = false,
|
||||
|
|
@ -751,11 +752,10 @@ private fun ContentToPreviewWithReply() {
|
|||
|
||||
private fun aInReplyToReady(
|
||||
replyContent: String,
|
||||
isThreaded: Boolean,
|
||||
): InReplyTo.Ready {
|
||||
return InReplyTo.Ready(
|
||||
eventId = EventId("\$event"),
|
||||
content = MessageContent(replyContent, null, false, isThreaded, TextMessageType(replyContent, null)),
|
||||
content = MessageContent(replyContent, null, false, false, TextMessageType(replyContent, null)),
|
||||
senderId = UserId("@Sender:domain"),
|
||||
senderDisplayName = "Sender",
|
||||
senderAvatarUrl = null,
|
||||
|
|
|
|||
|
|
@ -702,6 +702,22 @@ internal fun TextComposerReplyPreview() = ElementPreview {
|
|||
onResetComposerMode = {},
|
||||
enableTextFormatting = true,
|
||||
)
|
||||
TextComposer(
|
||||
RichTextEditorState("", fake = true),
|
||||
canSendMessage = false,
|
||||
onSendMessage = {},
|
||||
composerMode = MessageComposerMode.Reply(
|
||||
isThreaded = true,
|
||||
senderName = "Alice",
|
||||
eventId = EventId("$1234"),
|
||||
attachmentThumbnailInfo = null,
|
||||
defaultContent = "A message\n" +
|
||||
"With several lines\n" +
|
||||
"To preview larger textfields and long lines with overflow"
|
||||
),
|
||||
onResetComposerMode = {},
|
||||
enableTextFormatting = true,
|
||||
)
|
||||
TextComposer(
|
||||
RichTextEditorState("A message", fake = true),
|
||||
canSendMessage = true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue