feat(StatusChatList): Highlight chat item at creation time
Part of: https://github.com/status-im/status-desktop/issues/4767
This commit is contained in:
parent
1217771fd0
commit
9e6fbe955a
|
@ -101,6 +101,7 @@ Column {
|
||||||
muted: model.muted
|
muted: model.muted
|
||||||
hasUnreadMessages: model.hasUnreadMessages
|
hasUnreadMessages: model.hasUnreadMessages
|
||||||
notificationsCount: model.notificationsCount
|
notificationsCount: model.notificationsCount
|
||||||
|
highlightWhenCreated: model.highlight
|
||||||
selected: model.active
|
selected: model.active
|
||||||
icon.color: model.color
|
icon.color: model.color
|
||||||
image.isIdenticon: model.isIdenticon
|
image.isIdenticon: model.isIdenticon
|
||||||
|
@ -108,6 +109,8 @@ Column {
|
||||||
|
|
||||||
sensor.cursorShape: dragSensor.cursorShape
|
sensor.cursorShape: dragSensor.cursorShape
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
highlightWhenCreated = false
|
||||||
|
|
||||||
if (mouse.button === Qt.RightButton && !!statusChatList.popupMenu) {
|
if (mouse.button === Qt.RightButton && !!statusChatList.popupMenu) {
|
||||||
statusChatListItem.highlighted = true
|
statusChatListItem.highlighted = true
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
property int type: StatusChatListItem.Type.PublicChat
|
property int type: StatusChatListItem.Type.PublicChat
|
||||||
property bool highlighted: false
|
property bool highlighted: false
|
||||||
|
property bool highlightWhenCreated: false
|
||||||
property bool selected: false
|
property bool selected: false
|
||||||
property bool dragged: false
|
property bool dragged: false
|
||||||
property alias sensor: sensor
|
property alias sensor: sensor
|
||||||
|
@ -145,12 +146,14 @@ Rectangle {
|
||||||
statusChatListItem.notificationsCount > 0 ||
|
statusChatListItem.notificationsCount > 0 ||
|
||||||
statusChatListItem.selected ||
|
statusChatListItem.selected ||
|
||||||
statusChatListItem.highlighted ||
|
statusChatListItem.highlighted ||
|
||||||
|
statusChatListItem.highlightWhenCreated ||
|
||||||
hoverHander.hovered ||
|
hoverHander.hovered ||
|
||||||
statusBadge.visible ? Theme.palette.directColor1 : Theme.palette.directColor4
|
statusBadge.visible ? Theme.palette.directColor1 : Theme.palette.directColor4
|
||||||
}
|
}
|
||||||
font.weight: !statusChatListItem.muted &&
|
font.weight: !statusChatListItem.muted &&
|
||||||
(statusChatListItem.hasUnreadMessages ||
|
(statusChatListItem.hasUnreadMessages ||
|
||||||
statusChatListItem.notificationsCount > 0 ||
|
statusChatListItem.notificationsCount > 0 ||
|
||||||
|
statusChatListItem.highlightWhenCreated ||
|
||||||
statusBadge.visible) ? Font.Bold : Font.Medium
|
statusBadge.visible) ? Font.Bold : Font.Medium
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue