Fix compact mode msg names on their own lines

This commit is contained in:
miruka 2020-03-23 00:48:39 -04:00
parent ef2504ecae
commit 0682990666

View File

@ -111,11 +111,14 @@ HRowLayout {
// CSS
theme.chat.message.styleInclude +
// Sender name
eventContent.senderText +
// Message body
eventContent.contentText +
// Sender name & message body
(
smallAvatar && contentText.match(/^\s*<(p|h[1-6])>/) ?
contentText.replace(
/(^\s*<(p|h[1-6])>)/, "$1" + senderText,
) :
senderText + contentText
) +
// Time
// For some reason, if there's only one space,