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:
parent
ad7b5a9ff9
commit
6de288570c
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue