From f3d956aebcd34ecf8c4e2c44acd39d5de380233f Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 22 May 2021 10:16:42 +0200 Subject: Fix emoji in new RoomList --- resources/qml/ElidedLabel.qml | 2 +- resources/qml/RoomList.qml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'resources') diff --git a/resources/qml/ElidedLabel.qml b/resources/qml/ElidedLabel.qml index 5ae99de7..1f4aeeea 100644 --- a/resources/qml/ElidedLabel.qml +++ b/resources/qml/ElidedLabel.qml @@ -13,7 +13,7 @@ Label { property alias elideWidth: metrics.elideWidth color: Nheko.colors.text - text: metrics.elidedText + text: (textFormat == Text.PlainText) ? metrics.elidedText : TimelineManager.escapeEmoji(TimelineManager.htmlEscape(metrics.elidedText)) maximumLineCount: 1 elide: Text.ElideRight textFormat: Text.PlainText diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml index f2a957c9..89af78a5 100644 --- a/resources/qml/RoomList.qml +++ b/resources/qml/RoomList.qml @@ -119,6 +119,7 @@ Page { color: roomItem.importantText elideWidth: textContent.width - timestamp.width - Nheko.paddingMedium fullText: model.roomName + textFormat: Text.RichText } Item { @@ -146,6 +147,7 @@ Page { font.pixelSize: fontMetrics.font.pixelSize * 0.9 elideWidth: textContent.width - (notificationBubble.visible ? notificationBubble.width : 0) - Nheko.paddingSmall fullText: model.lastMessage + textFormat: Text.RichText } Item { -- cgit 1.5.1