fix(StatusChatInfoButton): prefix chat name with "#" if needed

Closes #229
This commit is contained in:
Pascal Precht 2021-07-06 11:29:08 +02:00 committed by Pascal Precht
parent 7b2030c6ab
commit 144ac69d31
1 changed files with 4 additions and 1 deletions

View File

@ -137,7 +137,10 @@ Rectangle {
anchors.leftMargin: statusIcon.visible ? 1 : 0 anchors.leftMargin: statusIcon.visible ? 1 : 0
anchors.top: parent.top anchors.top: parent.top
text: statusChatInfoButton.title text: statusChatInfoButton.type === StatusChatInfoButton.Type.PublicChat &&
!statusChatInfoButton.title.startsWith("#") ?
"#" + statusChatInfoButton.title :
statusChatInfoButton.title
color: statusChatInfoButton.muted ? Theme.palette.directColor5 : Theme.palette.directColor1 color: statusChatInfoButton.muted ? Theme.palette.directColor5 : Theme.palette.directColor1
font.pixelSize: 15 font.pixelSize: 15
font.weight: Font.Medium font.weight: Font.Medium