mirror of https://github.com/status-im/StatusQ.git
feat(StatusMessage): add `messageOriginInfo` property
This is a property that allows for adding information about the origin of a message (e.g. "Imported from discord"). This will most likely be only useful for messages that have been imported from any other platform. Because importing from other platforms requires those message to be signed by a Status Account, it's undesirable to render the public key of the account that signed imported messages. Hence, when there's a `messageOriginInfo`, we don't render the elided public key.
This commit is contained in:
parent
fd6d735df8
commit
780ade987d
|
@ -267,6 +267,7 @@ Rectangle {
|
|||
Layout.fillWidth: true
|
||||
sender: root.messageDetails.sender
|
||||
amISender: root.messageDetails.amISender
|
||||
messageOriginInfo: root.messageDetails.messageOriginInfo
|
||||
resendText: root.resendText
|
||||
showResendButton: root.hasExpired && root.messageDetails.amISender
|
||||
onClicked: root.senderNameClicked(sender, mouse)
|
||||
|
|
|
@ -13,6 +13,7 @@ QtObject {
|
|||
property int contentType: 0
|
||||
property string messageText: ""
|
||||
property string messageContent: ""
|
||||
property string messageOriginInfo: ""
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ Item {
|
|||
property bool isContact: sender.isContact
|
||||
property int trustIndicator: sender.trustIndicator
|
||||
property bool amISender: false
|
||||
property string messageOriginInfo: ""
|
||||
|
||||
signal clicked(var sender, var mouse)
|
||||
signal resendClicked()
|
||||
|
@ -56,6 +57,14 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
StatusBaseText {
|
||||
id: messageOriginInfo
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
visible: root.messageOriginInfo !== ""
|
||||
color: Theme.palette.baseColor1
|
||||
font.pixelSize: 10
|
||||
text: root.messageOriginInfo
|
||||
}
|
||||
StatusContactVerificationIcons {
|
||||
visible: !root.amISender
|
||||
isContact: root.isContact
|
||||
|
@ -78,7 +87,7 @@ Item {
|
|||
}
|
||||
StatusBaseText {
|
||||
id: tertiaryDetailText
|
||||
visible: !root.amISender
|
||||
visible: !root.amISender && messageOriginInfo == ""
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
font.pixelSize: 10
|
||||
elide: Text.ElideMiddle
|
||||
|
|
Loading…
Reference in New Issue