fix: Added `SystemMessagePinnedMessage` contentType
This commit is contained in:
parent
6997e05586
commit
98d8a70572
|
@ -17,6 +17,8 @@ type
|
||||||
ContactRequest = 11
|
ContactRequest = 11
|
||||||
DiscordMessage = 12
|
DiscordMessage = 12
|
||||||
ContactIdentityVerification = 13
|
ContactIdentityVerification = 13
|
||||||
|
# Local only
|
||||||
|
SystemMessagePinnedMessage = 14
|
||||||
|
|
||||||
type
|
type
|
||||||
StatusType* {.pure.} = enum
|
StatusType* {.pure.} = enum
|
||||||
|
|
|
@ -21,7 +21,8 @@ Control {
|
||||||
Audio = 5,
|
Audio = 5,
|
||||||
Transaction = 6,
|
Transaction = 6,
|
||||||
Invitation = 7,
|
Invitation = 7,
|
||||||
DiscordMessage = 8
|
DiscordMessage = 8,
|
||||||
|
SystemMessagePinnedMessage = 14
|
||||||
}
|
}
|
||||||
|
|
||||||
property list<Item> quickActions
|
property list<Item> quickActions
|
||||||
|
@ -186,9 +187,10 @@ Control {
|
||||||
id: messageLayout
|
id: messageLayout
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: 2
|
spacing: 2
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
active: isAReply
|
active: isAReply && root.messageDetails.contentType !== StatusMessage.ContentType.SystemMessagePinnedMessage
|
||||||
visible: active
|
visible: active
|
||||||
sourceComponent: StatusMessageReply {
|
sourceComponent: StatusMessageReply {
|
||||||
objectName: "StatusMessage_replyDetails"
|
objectName: "StatusMessage_replyDetails"
|
||||||
|
|
|
@ -204,6 +204,8 @@ Loader {
|
||||||
return fetchMoreMessagesButtonComponent
|
return fetchMoreMessagesButtonComponent
|
||||||
case Constants.messageContentType.systemMessagePrivateGroupType:
|
case Constants.messageContentType.systemMessagePrivateGroupType:
|
||||||
return privateGroupHeaderComponent
|
return privateGroupHeaderComponent
|
||||||
|
case Constants.messageContentType.systemMessagePinnedMessage:
|
||||||
|
return null
|
||||||
case Constants.messageContentType.gapType:
|
case Constants.messageContentType.gapType:
|
||||||
return gapComponent
|
return gapComponent
|
||||||
case Constants.messageContentType.newMessagesMarker:
|
case Constants.messageContentType.newMessagesMarker:
|
||||||
|
@ -276,6 +278,8 @@ Loader {
|
||||||
return StatusMessage.ContentType.Invitation;
|
return StatusMessage.ContentType.Invitation;
|
||||||
case Constants.messageContentType.discordMessageType:
|
case Constants.messageContentType.discordMessageType:
|
||||||
return StatusMessage.ContentType.DiscordMessage;
|
return StatusMessage.ContentType.DiscordMessage;
|
||||||
|
case Constants.messageContentType.systemMessagePinnedMessage:
|
||||||
|
return StatusMessage.ContentType.SystemMessagePinnedMessage;
|
||||||
case Constants.messageContentType.fetchMoreMessagesButton:
|
case Constants.messageContentType.fetchMoreMessagesButton:
|
||||||
case Constants.messageContentType.chatIdentifier:
|
case Constants.messageContentType.chatIdentifier:
|
||||||
case Constants.messageContentType.unknownContentType:
|
case Constants.messageContentType.unknownContentType:
|
||||||
|
@ -372,7 +376,6 @@ Loader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: messageComponent
|
id: messageComponent
|
||||||
|
|
||||||
|
|
|
@ -407,6 +407,7 @@ QtObject {
|
||||||
readonly property int gapType: 10
|
readonly property int gapType: 10
|
||||||
readonly property int contactRequestType: 11
|
readonly property int contactRequestType: 11
|
||||||
readonly property int discordMessageType: 12
|
readonly property int discordMessageType: 12
|
||||||
|
readonly property int systemMessagePinnedMessage: 14
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property QtObject messageModelRoles: QtObject {
|
readonly property QtObject messageModelRoles: QtObject {
|
||||||
|
|
Loading…
Reference in New Issue