Preserve composer media policy and display edit times for short or emoji text
This commit is contained in:
1 parent
8b34889a19
commit
48bdb85ff9
3 files changed
+8
-4
No files matched your search
@@ -668,7 +668,7 @@ MessageDelegate::Layout MessageDelegate::calcBodyLayout(
|
||||
}
|
||||
|
||||
L.emojiCount = detectEmojiOnly(text);
|
||||
L.emojiOnly = (L.emojiCount >= 1);
|
||||
L.emojiOnly = L.emojiCount >= 1 && !index.data(MsgEditedRole).toBool();
|
||||
|
||||
if (L.emojiOnly) {
|
||||
QFontMetrics fm(option.font);
|
||||
@@ -703,6 +703,8 @@ MessageDelegate::Layout MessageDelegate::calcBodyLayout(
|
||||
|
||||
QFontMetrics fm(option.font);
|
||||
int contentW = calcMaxLineWidth(option.font, text, limitW);
|
||||
QFont statusFont = option.font; statusFont.setPointSize(qMax(1, statusFont.pointSize() - 2));
|
||||
contentW = qMax(contentW, QFontMetrics(statusFont).horizontalAdvance(index.data(MsgTimeRole).toString()) + 4);
|
||||
|
||||
if (!L.isOutgoing) {
|
||||
QString author = index.data(MsgAuthorRole).toString();
|
||||
|
||||
Reference in new issue
Block a user