From 32cd2120acc6ff55842f9243d7116d7b8dd8f6ee Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 28 May 2024 10:54:20 +0400 Subject: [PATCH] Allow zero width space in the middle of text. Fixes #6959. --- Telegram/SourceFiles/chat_helpers/message_field.cpp | 5 +---- Telegram/lib_ui | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/chat_helpers/message_field.cpp b/Telegram/SourceFiles/chat_helpers/message_field.cpp index 648c5c98c2..557d0c337e 100644 --- a/Telegram/SourceFiles/chat_helpers/message_field.cpp +++ b/Telegram/SourceFiles/chat_helpers/message_field.cpp @@ -431,10 +431,7 @@ bool HasSendText(not_null field) { const auto &text = field->getTextWithTags().text; for (const auto &ch : text) { const auto code = ch.unicode(); - if (code != ' ' - && code != '\n' - && code != '\r' - && !IsReplacedBySpace(code)) { + if (!IsTrimmed(ch) && !IsReplacedBySpace(code)) { return true; } } diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 34fcd4981d..a48b3d3750 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 34fcd4981d764f0869793893f37822b9c09393ab +Subproject commit a48b3d3750ac1a1e3b2f4da3494fa5fb23b66106