Skip to content
This repository was archived by the owner on Sep 26, 2022. It is now read-only.

Commit 5da9cb0

Browse files
committed
fix(StatusChatListCategory): emit original mouse event data in clicked signal
This fixes a bug that was introduced in 01da750 with a breaking change where `StatusChatListCategoryItem`'s `clicked` signal would no longer receive a `mouse` event object. The reason this is happening is because we've introduced a new `clicked` signal on `StatusListItem`. The idea was to rely on that within `StatusChatListCategoryItem`, however, we didn't take into account that the new `clicked` signal in `StatusListItem` doesn't emit a `mouse` event object. To fix this issue could either reintroduce the custom `clicked` handler on `StatusChatListCategoryItem`, or listen to the original `sensor.onClicked` and `onTitleClicked` signals exposed by `StatusListItem` instead, ensuring the required `mouse` event data exists. Fixes #333
1 parent c679854 commit 5da9cb0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/StatusQ/Components/StatusChatListCategory.qml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,16 @@ Column {
3434

3535
showMenuButton: showActionButtons && !!statusChatListCategory.popupMenu
3636

37-
onClicked: {
37+
sensor.onClicked: {
3838
if (mouse.button === Qt.RightButton && showActionButtons && !!statusChatListCategory.popupMenu) {
3939
highlighted = true
4040
popupMenuSlot.item.popup(mouse.x + 4, mouse.y + 6)
4141
return
4242
}
4343
statusChatListCategory.opened = !opened
4444
}
45+
46+
onTitleClicked: statusChatListCategory.opened = !opened
4547
onToggleButtonClicked: statusChatListCategory.opened = !opened
4648
onMenuButtonClicked: {
4749
highlighted = true

0 commit comments

Comments
 (0)