From 91a7a77bb0b410ada06f5fbdc99fdb871446f93c Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 26 Mar 2018 00:15:55 +0400 Subject: [PATCH] Fix case-insensitive emoji suggestions. Fixes #4528, fixes #4511, fixes #4535. --- Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp b/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp index c599193bf..458c96c2a 100644 --- a/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp +++ b/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp @@ -437,7 +437,7 @@ QString SuggestionsController::getEmojiQuery() { _queryStartPosition += i + 2; const auto length = position - i; auto result = text.mid(i, length); - if (length == 2 && isUpperCaseLetter(text[1])) { + if (length == 2 && isUpperCaseLetter(result[1])) { // No upper case single letter suggestions. // We don't want to suggest emoji on :D and :P return QString();