feat(StatusChatListAndCategories): new API showPopupMenu

This commit is contained in:
Anthony Laibe 2021-07-16 11:13:34 +02:00 committed by Michał Cieślak
parent 2b5b56b0fa
commit 38736ad58a
1 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ Item {
property string selectedChatId: ""
property bool showCategoryActionButtons: false
property bool showPopupMenu: true
property alias chatList: statusChatList.chatListItems
property alias categoryList: statusChatListCategories
property alias sensor: sensor
@ -37,7 +38,7 @@ Item {
height: statusChatListAndCategories.height
acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: {
if (mouse.button === Qt.RightButton && !!statusChatListAndCategories.popupMenu) {
if (mouse.button === Qt.RightButton && showPopupMenu && !!statusChatListAndCategories.popupMenu) {
popupMenuSlot.item.popup(mouse.x + 4, mouse.y + 6)
return
}