fix(StatusChatList): Added property to control item's highlight (#646)

Needed for https://github.com/status-im/status-desktop/issues/5627
This commit is contained in:
Alexandra Betouni 2022-05-05 12:27:05 +03:00 committed by GitHub
parent e2728285e1
commit 310be728a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -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);

View File

@ -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]