fix(image-modal): fix having to click multiple times to close the image

Fixes #4586
This commit is contained in:
Jonathan Rainville 2022-01-26 15:36:11 -05:00 committed by Sale Djenic
parent b467c031b9
commit 25ac0fbb68
2 changed files with 20 additions and 21 deletions

View File

@ -137,27 +137,6 @@ Item {
store: root.rootStore
reactionModel: root.rootStore.emojiReactionsModel
}
StatusImageModal {
id: imagePopup
onClicked: {
if (button === Qt.LeftButton) {
imagePopup.close()
} else if(button === Qt.RightButton) {
contextmenu.imageSource = imagePopup.imageSource
contextmenu.hideEmojiPicker = true
contextmenu.isRightClickOnImage = true;
contextmenu.show()
}
}
Connections {
target: Global
onOpenImagePopup: {
imagePopup.openPopup(image);
}
}
}
EmptyChatPanel {
anchors.fill: parent

View File

@ -136,6 +136,26 @@ Item {
}
}
StatusImageModal {
id: imagePopup
onClicked: {
if (button === Qt.LeftButton) {
imagePopup.close()
} else if(button === Qt.RightButton) {
contextmenu.imageSource = imagePopup.imageSource
contextmenu.hideEmojiPicker = true
contextmenu.isRightClickOnImage = true;
contextmenu.show()
}
}
Connections {
target: Global
onOpenImagePopup: {
imagePopup.openPopup(image);
}
}
}
property Component profilePopupComponent: ProfilePopup {
id: profilePopup
profileStore: appMain.rootStore.profileSectionStore.profileStore