From 13bd813d52b9c1b5a62abcce6ee333826612d633 Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Tue, 2 May 2023 13:33:34 +0300 Subject: [PATCH] Added PinnedMessage simple implementation --- ui/imports/shared/views/chat/MessageView.qml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ui/imports/shared/views/chat/MessageView.qml b/ui/imports/shared/views/chat/MessageView.qml index 2099cc2387..ee4c040a76 100644 --- a/ui/imports/shared/views/chat/MessageView.qml +++ b/ui/imports/shared/views/chat/MessageView.qml @@ -205,7 +205,7 @@ Loader { case Constants.messageContentType.systemMessagePrivateGroupType: return privateGroupHeaderComponent case Constants.messageContentType.systemMessagePinnedMessage: - return null + return systemMessagePinnedMessageComponent case Constants.messageContentType.gapType: return gapComponent case Constants.messageContentType.newMessagesMarker: @@ -376,6 +376,22 @@ Loader { } } + Component { + id: systemMessagePinnedMessageComponent + + StatusBaseText { + width: parent.width - 120 + horizontalAlignment: Text.AlignHCenter + text: qsTr("%1 pinned a message").arg(quotedMessageAuthorDetailsDisplayName) + color: Theme.palette.directColor3 + font.family: Theme.palette.baseFont.name + font.pixelSize: Theme.primaryTextFontSize + textFormat: Text.RichText + wrapMode: Text.Wrap + topPadding: root.prevMessageIndex === 1 ? Style.current.bigPadding : 0 + } + } + Component { id: messageComponent