2021-01-25 15:50:42 -05:00
|
|
|
import QtQuick 2.13
|
2020-07-15 17:04:14 -04:00
|
|
|
import "../../../../../shared"
|
2021-09-28 18:04:06 +03:00
|
|
|
|
|
|
|
import utils 1.0
|
2020-07-15 17:04:14 -04:00
|
|
|
|
|
|
|
MouseArea {
|
2021-06-10 15:20:43 -04:00
|
|
|
enabled: !placeholderMessage
|
2020-07-20 17:59:01 -04:00
|
|
|
cursorShape: chatText.hoveredLink ? Qt.PointingHandCursor : undefined
|
2021-06-10 15:20:43 -04:00
|
|
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
2020-07-20 17:59:01 -04:00
|
|
|
z: 50
|
2020-07-15 17:04:14 -04:00
|
|
|
onClicked: {
|
2021-06-10 15:20:43 -04:00
|
|
|
if (activityCenterMessage) {
|
|
|
|
return clickMessage(false, isSticker, false)
|
|
|
|
}
|
|
|
|
if(mouse.button === Qt.RightButton) {
|
2021-08-25 22:31:00 +02:00
|
|
|
// Set parent, X & Y positions for the messageContextMenu
|
|
|
|
messageContextMenu.parent = root
|
|
|
|
messageContextMenu.setXPosition = function() { return (mouse.x)}
|
|
|
|
messageContextMenu.setYPosition = function() { return (mouse.y)}
|
2021-06-10 15:20:43 -04:00
|
|
|
clickMessage(false, isSticker, false)
|
2021-02-08 13:46:20 -05:00
|
|
|
if (typeof isMessageActive !== "undefined") {
|
2021-04-21 11:22:49 -04:00
|
|
|
setMessageActive(messageId, true)
|
2021-02-08 13:46:20 -05:00
|
|
|
}
|
2020-09-12 20:22:07 +02:00
|
|
|
return;
|
|
|
|
}
|
2021-03-30 10:13:20 -04:00
|
|
|
if (mouse.button === Qt.LeftButton && isSticker && stickersLoaded) {
|
|
|
|
if (isHovered) {
|
|
|
|
isHovered = false
|
|
|
|
}
|
|
|
|
|
2021-03-08 15:24:39 -04:00
|
|
|
openPopup(statusStickerPackClickPopup, {packId: stickerPackId} )
|
2020-07-15 17:04:14 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|