mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-03 02:06:19 +00:00
fix(Chat): Quoted message in a reply is not clickable
wrap the reply contents area (excluding the profile header) in a ColumnLayout and move the MouseArea that handles the `messageClicked()` signal there, thus avoiding the collisions between the two Fixes #10950
This commit is contained in:
parent
8d7ff095dd
commit
0cf01871b4
@ -62,15 +62,6 @@ Item {
|
|||||||
implicitHeight: messageLayout.implicitHeight
|
implicitHeight: messageLayout.implicitHeight
|
||||||
implicitWidth: messageLayout.implicitWidth
|
implicitWidth: messageLayout.implicitWidth
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: {
|
|
||||||
root.messageClicked(mouse)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: messageLayout
|
id: messageLayout
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@ -113,60 +104,81 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loader {
|
|
||||||
Layout.fillWidth: true
|
Item {
|
||||||
asynchronous: true
|
implicitWidth: messageContentsLayout.implicitWidth
|
||||||
active: !!replyDetails.messageText && replyDetails.contentType !== StatusMessage.ContentType.Sticker
|
implicitHeight: messageContentsLayout.implicitHeight
|
||||||
visible: active
|
|
||||||
sourceComponent: StatusTextMessage {
|
ColumnLayout {
|
||||||
objectName: "StatusMessage_replyDetails_textMessage"
|
id: messageContentsLayout
|
||||||
textField.font.pixelSize: Theme.secondaryTextFontSize
|
anchors.fill: parent
|
||||||
textField.color: Theme.palette.baseColor1
|
|
||||||
allowShowMore: false
|
Loader {
|
||||||
stripHtmlTags: true
|
Layout.fillWidth: true
|
||||||
convertToSingleLine: true
|
asynchronous: true
|
||||||
messageDetails: root.replyDetails
|
active: !!replyDetails.messageText && replyDetails.contentType !== StatusMessage.ContentType.Sticker
|
||||||
|
visible: active
|
||||||
|
sourceComponent: StatusTextMessage {
|
||||||
|
objectName: "StatusMessage_replyDetails_textMessage"
|
||||||
|
textField.font.pixelSize: Theme.secondaryTextFontSize
|
||||||
|
textField.color: Theme.palette.baseColor1
|
||||||
|
allowShowMore: false
|
||||||
|
stripHtmlTags: true
|
||||||
|
convertToSingleLine: true
|
||||||
|
messageDetails: root.replyDetails
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
asynchronous: true
|
||||||
|
active: replyDetails.contentType === StatusMessage.ContentType.Image
|
||||||
|
visible: active
|
||||||
|
sourceComponent: StatusMessageImageAlbum {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 56
|
||||||
|
|
||||||
|
album: replyDetails.albumCount > 0 ? replyDetails.album : [replyDetails.messageContent]
|
||||||
|
albumCount: replyDetails.albumCount > 0 ? replyDetails.albumCount : 1
|
||||||
|
imageWidth: 56
|
||||||
|
loadingComponentHeight: 56
|
||||||
|
shapeType: StatusImageMessage.ShapeType.ROUNDED
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StatusSticker {
|
||||||
|
asynchronous: true
|
||||||
|
active: replyDetails.contentType === StatusMessage.ContentType.Sticker
|
||||||
|
visible: active
|
||||||
|
asset.width: 48
|
||||||
|
asset.height: 48
|
||||||
|
asset.name: replyDetails.messageContent
|
||||||
|
asset.isImage: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 22
|
||||||
|
asynchronous: true
|
||||||
|
active: replyDetails.contentType === StatusMessage.ContentType.Audio
|
||||||
|
visible: active
|
||||||
|
sourceComponent: StatusAudioMessage {
|
||||||
|
anchors.left: parent.left
|
||||||
|
width: 125
|
||||||
|
height: 22
|
||||||
|
isPreview: true
|
||||||
|
audioSource: replyDetails.messageContent
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Loader {
|
MouseArea {
|
||||||
Layout.fillWidth: true
|
anchors.fill: parent
|
||||||
asynchronous: true
|
hoverEnabled: true
|
||||||
active: replyDetails.contentType === StatusMessage.ContentType.Image
|
cursorShape: Qt.PointingHandCursor
|
||||||
visible: active
|
onClicked: {
|
||||||
sourceComponent: StatusMessageImageAlbum {
|
root.messageClicked(mouse)
|
||||||
Layout.fillWidth: true
|
}
|
||||||
Layout.preferredHeight: 56
|
|
||||||
|
|
||||||
album: replyDetails.albumCount > 0 ? replyDetails.album : [replyDetails.messageContent]
|
|
||||||
albumCount: replyDetails.albumCount > 0 ? replyDetails.albumCount : 1
|
|
||||||
imageWidth: 56
|
|
||||||
loadingComponentHeight: 56
|
|
||||||
shapeType: StatusImageMessage.ShapeType.ROUNDED
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StatusSticker {
|
|
||||||
asynchronous: true
|
|
||||||
active: replyDetails.contentType === StatusMessage.ContentType.Sticker
|
|
||||||
visible: active
|
|
||||||
asset.width: 48
|
|
||||||
asset.height: 48
|
|
||||||
asset.name: replyDetails.messageContent
|
|
||||||
asset.isImage: true
|
|
||||||
}
|
|
||||||
Loader {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredHeight: 22
|
|
||||||
asynchronous: true
|
|
||||||
active: replyDetails.contentType === StatusMessage.ContentType.Audio
|
|
||||||
visible: active
|
|
||||||
sourceComponent: StatusAudioMessage {
|
|
||||||
anchors.left: parent.left
|
|
||||||
width: 125
|
|
||||||
height: 22
|
|
||||||
isPreview: true
|
|
||||||
audioSource: replyDetails.messageContent
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user