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:
parent
e2728285e1
commit
310be728a3
|
@ -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);
|
||||||
|
|
|
@ -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]
|
||||||
|
|
Loading…
Reference in New Issue