fix: alignment of emojis

- Added an nsbp in front of paragraphs, otherwise the alignment property was ignored
- Enabled richformat for channel list to avoid emoji overlap in last message
This commit is contained in:
Richard Ramos 2020-08-05 19:22:52 -04:00
parent 6df29da7b0
commit e484c41291
No known key found for this signature in database
GPG Key ID: 80D4B01265FDFE8F
2 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,7 @@ proc renderBlock(self: ChatMessageList, message: Message): string =
for pMsg in message.parsedText:
case pMsg.textType:
of "paragraph":
result = result & "<p>"
result = result & "<p>&nbsp;"
for children in pMsg.children:
result = result & self.renderInline(children)
result = result & "</p>"

View File

@ -93,6 +93,7 @@ Rectangle {
default: return lastMessage ? Emoji.parse(lastMessage, "26x26").replace(/\n|\r/g, ' ') : qsTrId("no-messages")
}
}
textFormat: Text.RichText
clip: true // This is needed because emojis don't ellide correctly
anchors.right: contactNumberChatsCircle.left
anchors.rightMargin: Style.current.smallPadding