fix(@desktop/chat): Modal on the Pinned Messages Popup isnt seen

fixes #4002
This commit is contained in:
Khushboo Mehta 2021-11-02 20:58:48 +01:00 committed by Iuri Matias
parent b9fcbcf5d3
commit edb103ee01
4 changed files with 14 additions and 18 deletions

View File

@ -17,7 +17,7 @@ Rectangle {
property alias editBtnActive: editBtn.active
signal hoverChanged(bool hovered)
signal setMessageActive(string messageId, bool active)
signal clickMessage(bool isProfileClick, bool isSticker, bool isImage, var image, bool emojiOnly)
signal clickMessage(bool isProfileClick, bool isSticker, bool isImage, var image, bool emojiOnly, bool hideEmojiPicker)
visible: !placeholderMessage && !activityCenterMessage &&
(buttonsContainer.parentIsHovered || isMessageActive)
@ -77,7 +77,7 @@ Rectangle {
buttonsContainer.messageContextMenu.parent = buttonsContainer
buttonsContainer.messageContextMenu.setXPosition = function() { return (-Math.abs(buttonsContainer.width - buttonsContainer.messageContextMenu.emojiContainer.width))}
buttonsContainer.messageContextMenu.setYPosition = function() { return (-buttonsContainer.messageContextMenu.height - 4)}
clickMessage(false, false, false, null, true)
clickMessage(false, false, false, null, true, false)
}
onHoveredChanged: buttonsContainer.hoverChanged(this.hovered)
}

View File

@ -108,10 +108,6 @@ ModalPopup {
anchors.topMargin: -Style.current.halfPadding
clip: true
function closePopup() {
popup.close()
}
delegate: Item {
id: messageDelegate
property var listView: ListView.view
@ -183,16 +179,6 @@ ModalPopup {
messageStore.showEdit = false;
messageStore.messageContextMenu = msgContextMenu;
}
MessageContextMenuView {
id: msgContextMenu
pinnedPopup: true
pinnedMessage: true
store: popup.rootStore
reactionModel: popup.rootStore.emojiReactionsModel
onShouldCloseParentPopup: {
messageDelegate.listView.closePopup();
}
}
}
MouseArea {
@ -219,6 +205,16 @@ ModalPopup {
}
}
}
MessageContextMenuView {
id: msgContextMenu
pinnedPopup: true
pinnedMessage: true
store: popup.rootStore
reactionModel: popup.rootStore.emojiReactionsModel
onShouldCloseParentPopup: {
popup.close()
}
}
}

View File

@ -80,7 +80,7 @@ Item {
fromAuthor: fromAuthor
editBtnActive: isText && !isEdit && isCurrentUser && showEdit
onClickMessage: {
parent.parent.parent.clickMessage(isProfileClick, isSticker, isImage, image, emojiOnly);
parent.parent.parent.clickMessage(isProfileClick, isSticker, isImage, image, emojiOnly, hideEmojiPicker);
}
}

View File

@ -190,7 +190,7 @@ Column {
function showReactionAuthors(fromAccounts, emojiId) {
return store.showReactionAuthors(fromAccounts, emojiId)
return root.rootStore.showReactionAuthors(fromAccounts, emojiId)
}
function startMessageFoundAnimation() {