From 57684aa454a7904a5d14e04a361cbac2d55464d6 Mon Sep 17 00:00:00 2001 From: Srevin Saju Date: Fri, 9 Apr 2021 17:23:01 +0300 Subject: [PATCH] fix: fix the emoji message size once again this used to work once upon a time, but it stopped working recently. This commit helps to make the emoji-only-messages bigger. In case, if emoji's are sent as a reply to a text message, this does not affect size then. fix: fix the size of the `(edited)` string when the message contains only emojis' and also when its edited --- imports/NeoChat/Component/Timeline/TextDelegate.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imports/NeoChat/Component/Timeline/TextDelegate.qml b/imports/NeoChat/Component/Timeline/TextDelegate.qml index 4cc06e372..2483695e2 100644 --- a/imports/NeoChat/Component/Timeline/TextDelegate.qml +++ b/imports/NeoChat/Component/Timeline/TextDelegate.qml @@ -14,7 +14,7 @@ TextEdit { Layout.margins: Kirigami.Units.largeSpacing Layout.topMargin: 0 - readonly property var isEmoji: /^(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])+$/ + readonly property var isEmoji: /^()?(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])+(<\/span>)?$/ property bool isEmote: false @@ -39,10 +39,10 @@ a{ } .user-pill{} -" + (isEmote ? "* " + author.displayName + " " : "") + model.display + (isEdited ? (" " + i18n("(edited)") + "") : "") +" + (isEmote ? "* " + author.displayName + " " : "") + model.display + (isEdited ? (" " + "" + i18n(" (edited)") + "") : "") color: Kirigami.Theme.textColor - font.pointSize: isEmoji.test(display) ? Kirigami.Theme.defaultFont.pointSize * 4 : Kirigami.Theme.defaultFont.pointSize + font.pointSize: !replyVisible && isEmoji.test(model.display) ? Kirigami.Theme.defaultFont.pointSize * 4 : Kirigami.Theme.defaultFont.pointSize selectByMouse: !Kirigami.Settings.isMobile readOnly: true wrapMode: Text.WordWrap