fix(@desktop/chat): show popup when image is clicked
This commit is contained in:
parent
ed8f2d35ce
commit
75abaabb5d
|
@ -358,6 +358,8 @@ Item {
|
|||
root.showReplyArea(messageId, author)
|
||||
}
|
||||
|
||||
onImageClicked: Global.openImagePopup(image)
|
||||
|
||||
stickersLoaded: root.stickersLoaded
|
||||
|
||||
onVisibleChanged: {
|
||||
|
|
|
@ -14,9 +14,11 @@ import StatusQ.Controls 0.1 as StatusQControls
|
|||
Item {
|
||||
id: root
|
||||
|
||||
property var messageStore
|
||||
property var contactsStore
|
||||
|
||||
property var messageContextMenu
|
||||
property var container
|
||||
property var contactsStore
|
||||
property int contentType
|
||||
|
||||
property int chatHorizontalPadding: Style.current.halfPadding
|
||||
|
@ -52,6 +54,8 @@ Item {
|
|||
signal addEmoji(bool isProfileClick, bool isSticker, bool isImage , var image, bool emojiOnly, bool hideEmojiPicker)
|
||||
signal clickMessage(bool isProfileClick, bool isSticker, bool isImage, var image, bool emojiOnly, bool hideEmojiPicker, bool isReply, bool isRightClickOnImage, string imageSource)
|
||||
signal replyClicked(string messageId, string author)
|
||||
signal imageClicked(var image)
|
||||
|
||||
width: parent.width
|
||||
height: messageContainer.height + messageContainer.anchors.topMargin
|
||||
+ (dateGroupLbl.visible ? dateGroupLbl.height + dateGroupLbl.anchors.topMargin : 0)
|
||||
|
@ -497,7 +501,7 @@ Item {
|
|||
imageWidth: 200
|
||||
onClicked: {
|
||||
if (mouse.button === Qt.LeftButton) {
|
||||
messageStore.imageClick(image)
|
||||
root.imageClicked(image)
|
||||
}
|
||||
else if (mouse.button === Qt.RightButton) {
|
||||
// Set parent, X & Y positions for the messageContextMenu
|
||||
|
|
|
@ -72,11 +72,6 @@ StatusPopupMenu {
|
|||
}
|
||||
|
||||
function show(userNameParam, fromAuthorParam, identiconParam, textParam, nicknameParam, emojiReactionsModel) {
|
||||
userName = userNameParam || ""
|
||||
nickname = nicknameParam || ""
|
||||
fromAuthor = fromAuthorParam || ""
|
||||
identicon = identiconParam || ""
|
||||
text = textParam || ""
|
||||
let newEmojiReactions = []
|
||||
if (!!emojiReactionsModel) {
|
||||
emojiReactionsModel.forEach(function (emojiReaction) {
|
||||
|
|
|
@ -12,6 +12,7 @@ import shared.controls.chat 1.0
|
|||
|
||||
Column {
|
||||
id: root
|
||||
|
||||
width: parent.width
|
||||
anchors.right: !isCurrentUser ? undefined : parent.right
|
||||
z: (typeof chatLogView === "undefined") ? 1 : (chatLogView.count - index)
|
||||
|
@ -127,7 +128,7 @@ Column {
|
|||
property bool isStatusUpdate: false
|
||||
property int statusAgeEpoch: 0
|
||||
|
||||
signal imageClick(var image)
|
||||
signal imageClicked(var image)
|
||||
property var scrollToBottom: function () {}
|
||||
|
||||
property var clickMessage: function(isProfileClick,
|
||||
|
@ -320,10 +321,8 @@ Column {
|
|||
onAddEmoji: {
|
||||
root.clickMessage(isProfileClick, isSticker, isImage , image, emojiOnly, hideEmojiPicker);
|
||||
}
|
||||
onChatImageClicked: {
|
||||
// Not Refactored Yet - Should do it via messageStore
|
||||
// root.imageClick(image);
|
||||
}
|
||||
onChatImageClicked: root.imageClicked(image)
|
||||
|
||||
onUserNameClicked: {
|
||||
// Not Refactored Yet - Should do it via messageStore
|
||||
// root.parent.clickMessage(isProfileClick);
|
||||
|
@ -344,7 +343,9 @@ Column {
|
|||
|
||||
Component {
|
||||
id: compactMessageComponent
|
||||
|
||||
CompactMessageView {
|
||||
messageStore: root.messageStore
|
||||
contactsStore: root.contactsStore
|
||||
messageContextMenu: root.messageContextMenu
|
||||
contentType: root.messageContentType
|
||||
|
@ -364,6 +365,7 @@ Column {
|
|||
onClickMessage: {
|
||||
root.clickMessage(isProfileClick, isSticker, isImage, image, emojiOnly, hideEmojiPicker, isReply, isRightClickOnImage, imageSource)
|
||||
}
|
||||
|
||||
onOpenStickerPackPopup: {
|
||||
root.openStickerPackPopup(stickerPackId);
|
||||
}
|
||||
|
@ -371,6 +373,8 @@ Column {
|
|||
onReplyClicked: {
|
||||
root.showReplyArea(messageId, author)
|
||||
}
|
||||
|
||||
onImageClicked: root.imageClicked(image)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue