fix: Added `SystemMessagePinnedMessage` contentType

This commit is contained in:
Igor Sirotin 2023-05-01 19:05:16 +03:00 committed by Jonathan Rainville
parent 6997e05586
commit 98d8a70572
4 changed files with 11 additions and 3 deletions

View File

@ -17,6 +17,8 @@ type
ContactRequest = 11
DiscordMessage = 12
ContactIdentityVerification = 13
# Local only
SystemMessagePinnedMessage = 14
type
StatusType* {.pure.} = enum

View File

@ -21,7 +21,8 @@ Control {
Audio = 5,
Transaction = 6,
Invitation = 7,
DiscordMessage = 8
DiscordMessage = 8,
SystemMessagePinnedMessage = 14
}
property list<Item> quickActions
@ -186,9 +187,10 @@ Control {
id: messageLayout
anchors.fill: parent
spacing: 2
Loader {
Layout.fillWidth: true
active: isAReply
active: isAReply && root.messageDetails.contentType !== StatusMessage.ContentType.SystemMessagePinnedMessage
visible: active
sourceComponent: StatusMessageReply {
objectName: "StatusMessage_replyDetails"

View File

@ -204,6 +204,8 @@ Loader {
return fetchMoreMessagesButtonComponent
case Constants.messageContentType.systemMessagePrivateGroupType:
return privateGroupHeaderComponent
case Constants.messageContentType.systemMessagePinnedMessage:
return null
case Constants.messageContentType.gapType:
return gapComponent
case Constants.messageContentType.newMessagesMarker:
@ -276,6 +278,8 @@ Loader {
return StatusMessage.ContentType.Invitation;
case Constants.messageContentType.discordMessageType:
return StatusMessage.ContentType.DiscordMessage;
case Constants.messageContentType.systemMessagePinnedMessage:
return StatusMessage.ContentType.SystemMessagePinnedMessage;
case Constants.messageContentType.fetchMoreMessagesButton:
case Constants.messageContentType.chatIdentifier:
case Constants.messageContentType.unknownContentType:
@ -372,7 +376,6 @@ Loader {
}
}
Component {
id: messageComponent

View File

@ -407,6 +407,7 @@ QtObject {
readonly property int gapType: 10
readonly property int contactRequestType: 11
readonly property int discordMessageType: 12
readonly property int systemMessagePinnedMessage: 14
}
readonly property QtObject messageModelRoles: QtObject {