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 { StatusChatList {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
model: Models.demoChatListItems model: Models.demoChatListItems
highlightItem: !root.createChat
onChatItemUnmuted: { onChatItemUnmuted: {
for (var i = 0; i < Models.demoChatListItems.count; i++) { for (var i = 0; i < Models.demoChatListItems.count; i++) {
let item = Models.demoChatListItems.get(i); let item = Models.demoChatListItems.get(i);

View File

@ -17,6 +17,7 @@ Column {
property string categoryId: "" property string categoryId: ""
property var model: null property var model: null
property bool draggableItems: false property bool draggableItems: false
property bool highlightItem: true
property alias statusChatListItems: statusChatListItems property alias statusChatListItems: statusChatListItems
@ -102,7 +103,7 @@ Column {
hasUnreadMessages: model.hasUnreadMessages hasUnreadMessages: model.hasUnreadMessages
notificationsCount: model.notificationsCount notificationsCount: model.notificationsCount
highlightWhenCreated: !!model.highlight highlightWhenCreated: !!model.highlight
selected: model.active selected: (model.active && statusChatList.highlightItem)
icon.emoji: model.emoji icon.emoji: model.emoji
icon.color: !!model.color ? model.color : Theme.palette.userCustomizationColors[model.colorId] icon.color: !!model.color ? model.color : Theme.palette.userCustomizationColors[model.colorId]