fix(@desktop/chat) keep message hover effect while context menu open
- keep context menu when emoji reaction clicked - move Connections out of Loader Fixes #6633
This commit is contained in:
parent
e5358bf29a
commit
368b29bb38
|
@ -113,6 +113,10 @@ Item {
|
|||
onHoverChanged: {
|
||||
hovered && setHovered(messageId, hovered)
|
||||
}
|
||||
onSetMessageActive: {
|
||||
root.setMessageActive(messageId, active)
|
||||
}
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 20
|
||||
anchors.top: messageContainer.top
|
||||
|
@ -160,15 +164,11 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: typeof root.messageContextMenu !== "undefined"
|
||||
sourceComponent: Component {
|
||||
Connections {
|
||||
enabled: isMessageActive
|
||||
target: root.messageContextMenu
|
||||
onClosed: root.setMessageActive(messageId, false)
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
enabled: isHovered || isMessageActive
|
||||
target: typeof root.messageContextMenu !== "undefined" ? root.messageContextMenu : null
|
||||
onOpened: root.setMessageActive(messageId, true)
|
||||
onClosed: root.setMessageActive(messageId, false)
|
||||
}
|
||||
|
||||
DateGroup {
|
||||
|
|
|
@ -185,7 +185,6 @@ StatusPopupMenu {
|
|||
reactedByUser: !!root.emojiReactionsReactedByUser[model.emojiId]
|
||||
onCloseModal: {
|
||||
root.toggleReaction(root.messageId, emojiId)
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue