From 9e84681856ba273ea454c17e7c8339117a54f83b Mon Sep 17 00:00:00 2001 From: Fadi SHEHADEH <fadi.shehadeh@savoirfairelinux.com> Date: Fri, 3 Feb 2023 15:32:35 -0500 Subject: [PATCH] emoji: fix background color - isEmojiOnly changed to message containing only an emoji, not an edit or reply. - adapted size GitLab: #957 Change-Id: I78388a406a2a0b9c93f1c291850062fd9bf04a54 --- src/app/commoncomponents/TextMessageDelegate.qml | 2 +- src/libclient/messagelistmodel.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/commoncomponents/TextMessageDelegate.qml b/src/app/commoncomponents/TextMessageDelegate.qml index adaa0bbee..229e7d2ae 100644 --- a/src/app/commoncomponents/TextMessageDelegate.qml +++ b/src/app/commoncomponents/TextMessageDelegate.qml @@ -78,7 +78,7 @@ SBSMessageBase { wrapMode: Label.WrapAtWordBoundaryOrAnywhere selectByMouse: true - font.pixelSize: isEmojiOnly? JamiTheme.chatviewEmojiSize : JamiTheme.chatviewFontSize + font.pixelSize: isEmojiOnly? JamiTheme.chatviewEmojiSize : JamiTheme.emojiBubbleSize font.hintingPreference: Font.PreferNoHinting renderType: Text.NativeRendering textFormat: Text.MarkdownText diff --git a/src/libclient/messagelistmodel.cpp b/src/libclient/messagelistmodel.cpp index 0e64cf44f..b9c98b188 100644 --- a/src/libclient/messagelistmodel.cpp +++ b/src/libclient/messagelistmodel.cpp @@ -479,7 +479,8 @@ MessageListModel::dataForItem(item_t item, int, int role) const case Role::Readers: return QVariant(messageToReaders_[item.first]); case Role::IsEmojiOnly: - return QVariant(isOnlyEmoji(item.second.body)); + return QVariant(replyId.isEmpty() && item.second.previousBodies.isEmpty() + && isOnlyEmoji(item.second.body)); case Role::Reactions: return QVariant(item.second.reactions); default: -- GitLab