refactor(StatusChatList): `categoryId` parameter added to `chatItemSelected` signal

This commit is contained in:
Sale Djenic 2021-12-01 13:25:49 +01:00 committed by saledjenic
parent c2bab872be
commit e0f34a3e1d
2 changed files with 5 additions and 5 deletions

View File

@ -24,7 +24,7 @@ Column {
property var filterFn property var filterFn
signal chatItemSelected(string id) signal chatItemSelected(string categoryId, string id)
signal chatItemUnmuted(string id) signal chatItemUnmuted(string id)
signal chatItemReordered(string id, int from, int to) signal chatItemReordered(string id, int from, int to)
@ -136,7 +136,7 @@ Column {
return return
} }
if (!statusChatListItem.selected) { if (!statusChatListItem.selected) {
statusChatList.chatItemSelected(model.itemId) statusChatList.chatItemSelected(model.parentItemId, model.itemId)
} }
} }
onUnmute: statusChatList.chatItemUnmuted(model.itemId) onUnmute: statusChatList.chatItemUnmuted(model.itemId)

View File

@ -34,7 +34,7 @@ Item {
property Component chatListPopupMenu property Component chatListPopupMenu
property Component popupMenu property Component popupMenu
signal chatItemSelected(string id) signal chatItemSelected(string categoryId, string id)
signal chatItemUnmuted(string id) signal chatItemUnmuted(string id)
signal chatItemReordered(string categoryId, string chatId, int from, int to) signal chatItemReordered(string categoryId, string chatId, int from, int to)
signal chatListCategoryReordered(string categoryId, int from, int to) signal chatListCategoryReordered(string categoryId, int from, int to)
@ -70,7 +70,7 @@ Item {
id: statusChatList id: statusChatList
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
visible: statusChatList.model.count > 0 visible: statusChatList.model.count > 0
onChatItemSelected: statusChatListAndCategories.chatItemSelected(id) onChatItemSelected: statusChatListAndCategories.chatItemSelected(categoryId, id)
onChatItemUnmuted: statusChatListAndCategories.chatItemUnmuted(id) onChatItemUnmuted: statusChatListAndCategories.chatItemUnmuted(id)
onChatItemReordered: statusChatListAndCategories.chatItemReordered(categoryId, id, from, to) onChatItemReordered: statusChatListAndCategories.chatItemReordered(categoryId, id, from, to)
draggableItems: statusChatListAndCategories.draggableItems draggableItems: statusChatListAndCategories.draggableItems
@ -139,7 +139,7 @@ Item {
addButton.onClicked: statusChatListAndCategories.categoryAddButtonClicked(model.itemId) addButton.onClicked: statusChatListAndCategories.categoryAddButtonClicked(model.itemId)
chatList.model: model.subItems chatList.model: model.subItems
chatList.onChatItemSelected: statusChatListAndCategories.chatItemSelected(id) chatList.onChatItemSelected: statusChatListAndCategories.chatItemSelected(categoryId, id)
chatList.onChatItemUnmuted: statusChatListAndCategories.chatItemUnmuted(id) chatList.onChatItemUnmuted: statusChatListAndCategories.chatItemUnmuted(id)
chatList.onChatItemReordered: statusChatListAndCategories.chatItemReordered(model.itemId, id, from, to) chatList.onChatItemReordered: statusChatListAndCategories.chatItemReordered(model.itemId, id, from, to)
chatList.draggableItems: statusChatListAndCategories.draggableItems chatList.draggableItems: statusChatListAndCategories.draggableItems