Merge pull request 'dont parse emojis until message rendertime' (#275) from loadfaster into master
the build was successful Details

This commit is contained in:
Dan Ballard 2020-04-03 12:45:21 -07:00
commit cef2ae28d2
2 changed files with 5 additions and 4 deletions

View File

@ -66,7 +66,7 @@ Item {
"_handle": handle, "_handle": handle,
"_from": from, "_from": from,
"_displayName": displayName, "_displayName": displayName,
"_message":parse(msg.d, 12, true), "_message": msg.d,
"_rawMessage":msg.d, "_rawMessage":msg.d,
"_image": image, "_image": image,
"_mid": mid, "_mid": mid,
@ -99,7 +99,7 @@ Item {
"_handle": handle, "_handle": handle,
"_from": from, "_from": from,
"_displayName": displayName, "_displayName": displayName,
"_message":parse(msg.d, 24, true), "_message": msg.d,
"_rawMessage":msg.d, "_rawMessage":msg.d,
"_image": image, "_image": image,
"_mid": mid, "_mid": mid,

View File

@ -13,7 +13,7 @@ Item {
anchors.right: fromMe ? parent.right : undefined anchors.right: fromMe ? parent.right : undefined
height: Math.max(imgProfile.height, rectMessageBubble.height) height: Math.max(imgProfile.height, rectMessageBubble.height)
property alias message: lbl.text property string message
property string rawMessage property string rawMessage
property string from property string from
property string handle property string handle
@ -100,12 +100,13 @@ Item {
leftPadding: 10 leftPadding: 10
font.pixelSize: gcd.themeScale * 12 font.pixelSize: gcd.themeScale * 12
wrapMode: TextEdit.NoWrap wrapMode: TextEdit.NoWrap
text: message text: lbl.text
textFormat: Text.RichText textFormat: Text.RichText
} }
TextEdit { // this is the actual text display TextEdit { // this is the actual text display
id: lbl id: lbl
text: parse(message, 12, true)
color: "#FFFFFF" color: "#FFFFFF"
padding: 6 padding: 6
leftPadding: 10 leftPadding: 10