[StatusChatList]: added marks indicating unread msg and mentions

Closes #8265
This commit is contained in:
Alexandra Betouni 2023-04-06 20:22:23 +03:00
parent cbdc3e61b5
commit e35086f448
1 changed files with 14 additions and 11 deletions

View File

@ -187,19 +187,22 @@ Rectangle {
visible: mutedIconSensor.containsMouse
}
}
StatusBadge {
id: statusBadge
anchors.verticalCenter: parent.verticalCenter
Item {
width: 32
height: parent.height
anchors.right: parent.right
anchors.rightMargin: 8
color: root.muted ? Theme.palette.primaryColor2 : Theme.palette.primaryColor1
border.width: 4
border.color: color
value: root.notificationsCount
visible: root.notificationsCount > 0
StatusBadge {
id: statusBadge
readonly property bool onlyUnread: (root.notificationsCount === 0 && root.hasUnreadMessages)
anchors.centerIn: parent
color: onlyUnread ? Theme.palette.baseColor1 :
root.muted ? Theme.palette.primaryColor2 : Theme.palette.primaryColor1
border.width: onlyUnread ? -2 : 4
border.color: color
value: root.notificationsCount
visible: (root.notificationsCount > 0 || onlyUnread)
}
}
}
}