From e2ba041ec6152934395d64d284947c9e218994c2 Mon Sep 17 00:00:00 2001 From: Alexandra Betouni <31625338+alexandraB99@users.noreply.github.com> Date: Thu, 5 May 2022 12:27:05 +0300 Subject: [PATCH] fix(StatusChatList): Added property to control item's highlight (#646) Needed for https://github.com/status-im/status-desktop/issues/5627 --- ui/StatusQ/sandbox/demoapp/StatusAppChatView.qml | 1 + ui/StatusQ/src/StatusQ/Components/StatusChatList.qml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/StatusQ/sandbox/demoapp/StatusAppChatView.qml b/ui/StatusQ/sandbox/demoapp/StatusAppChatView.qml index dae571b01b..e9cb5c62ed 100644 --- a/ui/StatusQ/sandbox/demoapp/StatusAppChatView.qml +++ b/ui/StatusQ/sandbox/demoapp/StatusAppChatView.qml @@ -74,6 +74,7 @@ StatusAppThreePanelLayout { StatusChatList { anchors.horizontalCenter: parent.horizontalCenter model: Models.demoChatListItems + highlightItem: !root.createChat onChatItemUnmuted: { for (var i = 0; i < Models.demoChatListItems.count; i++) { let item = Models.demoChatListItems.get(i); diff --git a/ui/StatusQ/src/StatusQ/Components/StatusChatList.qml b/ui/StatusQ/src/StatusQ/Components/StatusChatList.qml index 14bcd2485d..8c4061e523 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusChatList.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusChatList.qml @@ -17,6 +17,7 @@ Column { property string categoryId: "" property var model: null property bool draggableItems: false + property bool highlightItem: true property alias statusChatListItems: statusChatListItems @@ -102,7 +103,7 @@ Column { hasUnreadMessages: model.hasUnreadMessages notificationsCount: model.notificationsCount highlightWhenCreated: !!model.highlight - selected: model.active + selected: (model.active && statusChatList.highlightItem) icon.emoji: model.emoji icon.color: !!model.color ? model.color : Theme.palette.userCustomizationColors[model.colorId]