fix(StatusChatList): ensure popupMenu closeHandler don't break

These broke because we were referring to a `highlighted` property that
was wrongly scoped.

Fixes #216
This commit is contained in:
Pascal Precht 2021-07-02 12:28:43 +02:00 committed by Michał Cieślak
parent 2fc884244e
commit 867be4194d
1 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ Column {
onClicked: {
if (mouse.button === Qt.RightButton && !!statusChatList.popupMenu) {
highlighted = true
statusChatListItem.highlighted = true
let originalOpenHandler = popupMenuSlot.item.openHandler
let originalCloseHandler = popupMenuSlot.item.closeHandler
@ -71,7 +71,7 @@ Column {
}
popupMenuSlot.item.closeHandler = function () {
highlighted = false
statusChatListItem.highlighted = false
if (!!originalCloseHandler) {
originalCloseHandler()
}