refactor: fix empty categories handling (#544)

* feat(StatusChatListCategory): display item if the model is a category
* fix(StatusChatListAndCategories): do not display categories in StatusChatList
This commit is contained in:
Richard Ramos 2022-01-31 08:54:28 -04:00 committed by Michał Cieślak
parent ad7b5a9ff9
commit 6de288570c
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ Item {
draggableItems: statusChatListAndCategories.draggableItems draggableItems: statusChatListAndCategories.draggableItems
model: statusChatListAndCategories.model model: statusChatListAndCategories.model
filterFn: function (model) { filterFn: function (model) {
return (model.subItems.count === 0) return !model.isCategory
} }
popupMenu: statusChatListAndCategories.chatListPopupMenu popupMenu: statusChatListAndCategories.chatListPopupMenu
} }

View File

@ -35,7 +35,7 @@ Column {
StatusChatListCategoryItem { StatusChatListCategoryItem {
id: statusChatListCategoryItem id: statusChatListCategoryItem
title: statusChatListCategory.name title: statusChatListCategory.name
visible: (model.subItems.count > 0) visible: model.isCategory
opened: statusChatListCategory.opened opened: statusChatListCategory.opened
sensor.pressAndHoldInterval: 150 sensor.pressAndHoldInterval: 150