fix(StatusChatListItem): ensure public chat names are prefixed with '#'

Closes #191
This commit is contained in:
Pascal Precht 2021-06-25 12:33:30 +02:00 committed by Michał Cieślak
parent d46130b9a5
commit 29782dca80
2 changed files with 5 additions and 2 deletions

View File

@ -678,7 +678,7 @@ Rectangle {
}
ListElement {
chatId: "1"
name: "#status-desktop"
name: "status-desktop"
chatType: StatusChatListItem.Type.PublicChat
muted: false
hasUnreadMessages: true

View File

@ -145,7 +145,10 @@ Rectangle {
anchors.leftMargin: statusIcon.visible ? 1 : 8
anchors.verticalCenter: parent.verticalCenter
text: statusChatListItem.name
text: statusChatListItem.type === StatusChatListItem.Type.PublicChat &&
!statusChatListItem.name.startsWith("#") ?
"#" + statusChatListItem.name :
statusChatListItem.name
color: {
if (statusChatListItem.muted && !sensor.containsMouse && !statusChatListItem.highlighted) {
return Theme.palette.directColor5