feat(StatusMessageReply): introduce `profileClickable` property
This is analogue to `profileClickable` available on `StatusMessage`, preventing users to activate a reply-to-message's profile avatar. At the time of this commit, this is only the case for imported messages. So we can derive that, if `StatusMessage.profileClickable` is false, then `StatusMessageReply.profileClickable` is also false. Hence, we don't need to expose this property to higher level APIs.
This commit is contained in:
parent
3b6a6067af
commit
fc10a0d43d
|
@ -214,6 +214,7 @@ Rectangle {
|
|||
visible: active
|
||||
sourceComponent: StatusMessageReply {
|
||||
replyDetails: root.replyDetails
|
||||
profileClickable: root.profileClickable
|
||||
onReplyProfileClicked: root.replyProfileClicked(sender, mouse)
|
||||
audioMessageInfoText: root.audioMessageInfoText
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ Item {
|
|||
|
||||
property StatusMessageDetails replyDetails
|
||||
property string audioMessageInfoText: ""
|
||||
property bool profileClickable: true
|
||||
|
||||
signal replyProfileClicked(var sender, var mouse)
|
||||
|
||||
|
@ -61,9 +62,10 @@ Item {
|
|||
asset: replyDetails.sender.profileImage.assetSettings
|
||||
ringSettings: replyDetails.sender.profileImage.ringSettings
|
||||
MouseArea {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
anchors.fill: parent
|
||||
enabled: root.profileClickable
|
||||
onClicked: replyProfileClicked(this, mouse)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue