Added PinnedMessage simple implementation

This commit is contained in:
Igor Sirotin 2023-05-02 13:33:34 +03:00 committed by Jonathan Rainville
parent 98d8a70572
commit 13bd813d52

View File

@ -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