From c95f4d82769b9eb5836f0ffbf9f87e054c393cec Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 21 Jan 2020 20:41:09 +0100 Subject: Fix colors in typing display, when username contains emoji --- resources/qml/Avatar.qml | 3 ++- resources/qml/TimelineView.qml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'resources/qml') diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml index a53f057b..25fff7f3 100644 --- a/resources/qml/Avatar.qml +++ b/resources/qml/Avatar.qml @@ -19,7 +19,8 @@ Rectangle { Text { anchors.fill: parent - text: String.fromCodePoint(displayName.codePointAt(0)) + text: chat.model.escapeEmoji(String.fromCodePoint(displayName.codePointAt(0))) + textFormat: Text.RichText color: colors.text font.pixelSize: avatar.height/2 verticalAlignment: Text.AlignVCenter diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index 60a8e6c1..a93f50c0 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -206,6 +206,7 @@ Item { id: typingDisplay text: chat.model ? chat.model.formatTypingUsers(chat.model.typingUsers, chatFooter.color) : "" + textFormat: Text.RichText color: colors.windowText } } -- cgit 1.5.1