From 71ab9cebcf46d548121eca2b4ee4c1d8a31b76ff Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Mon, 4 Oct 2021 15:22:22 +0200 Subject: [PATCH] fix(ChatLayout): ensure channel name is vertically centered This was originally reported in https://github.com/status-im/StatusQ/issues/427, however it turns out that the underlying component already handles this case correctly. The reason the channel name is not vertically centered inside Status Desktop, is because the returned value of `XSS.filterXss()` for the `subTitle` is never an empty string. Trimming the return value fixes this. --- ui/app/AppLayouts/Chat/ChatColumn.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Chat/ChatColumn.qml b/ui/app/AppLayouts/Chat/ChatColumn.qml index 8feb37b310..878a625b56 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn.qml @@ -179,7 +179,7 @@ Item { //% "1 member" return qsTrId("1-member"); case Constants.chatTypeCommunity: - return Utils.linkifyAndXSS(chatsModel.channelView.activeChannel.description) + return Utils.linkifyAndXSS(chatsModel.channelView.activeChannel.description).trim() default: return "" }