From a8ab750230267dc9d74c7a74e446b632ff164958 Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 14 Feb 2024 10:59:25 +0100 Subject: [PATCH 1/3] fix: double ellipsis --- src/messages/MessageElement.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/messages/MessageElement.cpp b/src/messages/MessageElement.cpp index 28027ba61ca..272aea591ca 100644 --- a/src/messages/MessageElement.cpp +++ b/src/messages/MessageElement.cpp @@ -685,6 +685,7 @@ void SingleLineTextElement::addToContainer(MessageLayoutContainer &container, currentText += ' '; } + bool done = false; for (const auto &parsedWord : app->getEmotes()->getEmojis()->parse(word.text)) { @@ -698,6 +699,7 @@ void SingleLineTextElement::addToContainer(MessageLayoutContainer &container, container.remainingWidth()); if (currentText != prev) { + done = true; break; } } @@ -720,6 +722,7 @@ void SingleLineTextElement::addToContainer(MessageLayoutContainer &container, emoteSize.width())) { currentText += ellipsis; + done = true; break; } @@ -735,6 +738,11 @@ void SingleLineTextElement::addToContainer(MessageLayoutContainer &container, } } } + + if (done) + { + break; + } } // Add the last of the pending message text to the container. From be21f0faedcca33a56e3258e2bfe9dc70c5c1d9f Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 14 Feb 2024 10:59:58 +0100 Subject: [PATCH 2/3] fix: use ellipsis character --- src/messages/MessageElement.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/messages/MessageElement.cpp b/src/messages/MessageElement.cpp index 272aea591ca..d19508c5ea5 100644 --- a/src/messages/MessageElement.cpp +++ b/src/messages/MessageElement.cpp @@ -665,7 +665,7 @@ void SingleLineTextElement::addToContainer(MessageLayoutContainer &container, return e; }; - static const auto ellipsis = QStringLiteral("..."); + static const auto ellipsis = QStringLiteral("…"); // String to continuously append words onto until we place it in the container // once we encounter an emote or reach the end of the message text. */ From 86774c2aab799eac8775414e76a9e5768cb6aeef Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 14 Feb 2024 11:14:59 +0100 Subject: [PATCH 3/3] chore: add changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 394596b6273..9ae65ac1bd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,7 +47,7 @@ - Bugfix: Fixed an issue where the setting `Only search for emote autocompletion at the start of emote names` wouldn't disable if it was enabled when the client started. (#4855) - Bugfix: Fixed empty page being added when showing out of bounds dialog. (#4849) - Bugfix: Fixed issue on Windows preventing the title bar from being dragged in the top left corner. (#4873) -- Bugfix: Fixed an issue where reply context didn't render correctly if an emoji was touching text. (#4875, #4977) +- Bugfix: Fixed an issue where reply context didn't render correctly if an emoji was touching text. (#4875, #4977, #5174) - Bugfix: Fixed the input completion popup from disappearing when clicking on it on Windows and macOS. (#4876) - Bugfix: Fixed double-click text selection moving its position with each new message. (#4898) - Bugfix: Fixed an issue where notifications on Windows would contain no or an old avatar. (#4899)