From 6de288570c947ac778409719ca12543c575ff19d Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Mon, 31 Jan 2022 08:54:28 -0400 Subject: [PATCH] refactor: fix empty categories handling (#544) * feat(StatusChatListCategory): display item if the model is a category * fix(StatusChatListAndCategories): do not display categories in StatusChatList --- .../src/StatusQ/Components/StatusChatListAndCategories.qml | 2 +- ui/StatusQ/src/StatusQ/Components/StatusChatListCategory.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Components/StatusChatListAndCategories.qml b/ui/StatusQ/src/StatusQ/Components/StatusChatListAndCategories.qml index 926b497c53..eb07046470 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusChatListAndCategories.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusChatListAndCategories.qml @@ -76,7 +76,7 @@ Item { draggableItems: statusChatListAndCategories.draggableItems model: statusChatListAndCategories.model filterFn: function (model) { - return (model.subItems.count === 0) + return !model.isCategory } popupMenu: statusChatListAndCategories.chatListPopupMenu } diff --git a/ui/StatusQ/src/StatusQ/Components/StatusChatListCategory.qml b/ui/StatusQ/src/StatusQ/Components/StatusChatListCategory.qml index eafd5596fc..1803b13270 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusChatListCategory.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusChatListCategory.qml @@ -35,7 +35,7 @@ Column { StatusChatListCategoryItem { id: statusChatListCategoryItem title: statusChatListCategory.name - visible: (model.subItems.count > 0) + visible: model.isCategory opened: statusChatListCategory.opened sensor.pressAndHoldInterval: 150