Skip to content

Commit

Permalink
[StatusChatList]: added marks indicating unread msg and mentions
Browse files Browse the repository at this point in the history
Closes #8265
  • Loading branch information
alexandraB99 committed Apr 7, 2023
1 parent cbdc3e6 commit e35086f
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions ui/StatusQ/src/StatusQ/Components/StatusChatListItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
}

0 comments on commit e35086f

Please sign in to comment.