feat: disable reply on stickers and make sticker images smooth
This commit is contained in:
parent
ce8cd4183f
commit
1d0e4fe2cf
|
@ -56,12 +56,13 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
function clickMessage(isProfileClick) {
|
||||
function clickMessage(isProfileClick, isSticker = false) {
|
||||
if (!isProfileClick) {
|
||||
SelectedMessage.set(messageId, fromAuthor);
|
||||
}
|
||||
profileClick(userName, fromAuthor, identicon);
|
||||
messageContextMenu.isProfile = !!isProfileClick
|
||||
messageContextMenu.isSticker = isSticker
|
||||
messageContextMenu.popup()
|
||||
// Position the center of the menu where the mouse is
|
||||
messageContextMenu.x = messageContextMenu.x - messageContextMenu.width / 2
|
||||
|
|
|
@ -8,7 +8,7 @@ MouseArea {
|
|||
z: 50
|
||||
onClicked: {
|
||||
if(mouse.button & Qt.RightButton) {
|
||||
clickMessage()
|
||||
clickMessage(false, isSticker)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,5 +6,7 @@ Image {
|
|||
visible: contentType === Constants.stickerType
|
||||
width: 140
|
||||
height: this.visible ? 140 : 0
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
source: this.visible ? ("https://ipfs.infura.io/ipfs/" + sticker) : ""
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import "./"
|
|||
|
||||
PopupMenu {
|
||||
property bool isProfile: false
|
||||
property bool isSticker: false
|
||||
|
||||
id: messageContextMenu
|
||||
width: messageContextMenu.isProfile ? profileHeader.width : emojiContainer.width
|
||||
|
@ -109,5 +110,6 @@ PopupMenu {
|
|||
icon.source: "../../../img/messageActive.svg"
|
||||
icon.width: 16
|
||||
icon.height: 16
|
||||
enabled: !isSticker
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ GridView {
|
|||
Image {
|
||||
width: 80
|
||||
height: 80
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: "https://ipfs.infura.io/ipfs/" + url
|
||||
MouseArea {
|
||||
|
|
|
@ -28,7 +28,8 @@ Rectangle {
|
|||
smooth: false
|
||||
anchors.fill: parent
|
||||
source: "https://ipfs.infura.io/ipfs/" + thumbnail
|
||||
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
MouseArea {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
|
|
Loading…
Reference in New Issue