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
|
visible: active
|
||||||
sourceComponent: StatusMessageReply {
|
sourceComponent: StatusMessageReply {
|
||||||
replyDetails: root.replyDetails
|
replyDetails: root.replyDetails
|
||||||
|
profileClickable: root.profileClickable
|
||||||
onReplyProfileClicked: root.replyProfileClicked(sender, mouse)
|
onReplyProfileClicked: root.replyProfileClicked(sender, mouse)
|
||||||
audioMessageInfoText: root.audioMessageInfoText
|
audioMessageInfoText: root.audioMessageInfoText
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ Item {
|
||||||
|
|
||||||
property StatusMessageDetails replyDetails
|
property StatusMessageDetails replyDetails
|
||||||
property string audioMessageInfoText: ""
|
property string audioMessageInfoText: ""
|
||||||
|
property bool profileClickable: true
|
||||||
|
|
||||||
signal replyProfileClicked(var sender, var mouse)
|
signal replyProfileClicked(var sender, var mouse)
|
||||||
|
|
||||||
|
@ -61,9 +62,10 @@ Item {
|
||||||
asset: replyDetails.sender.profileImage.assetSettings
|
asset: replyDetails.sender.profileImage.assetSettings
|
||||||
ringSettings: replyDetails.sender.profileImage.ringSettings
|
ringSettings: replyDetails.sender.profileImage.ringSettings
|
||||||
MouseArea {
|
MouseArea {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
enabled: root.profileClickable
|
||||||
onClicked: replyProfileClicked(this, mouse)
|
onClicked: replyProfileClicked(this, mouse)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue