From 2dcbe15f8b575eedcb057b57052b9f4bef8b0adc Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 3 Apr 2019 16:18:34 +0400 Subject: [PATCH] Ignore tab key in emoji suggestions for Support mode. --- .../SourceFiles/chat_helpers/emoji_suggestions_widget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp b/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp index ab68dac5f..e765a4995 100644 --- a/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp +++ b/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp @@ -17,6 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "platform/platform_specific.h" #include "core/application.h" #include "core/event_filter.h" +#include "auth_session.h" #include "styles/style_chat_helpers.h" namespace Ui { @@ -274,7 +275,8 @@ void SuggestionsWidget::keyPressEvent(QKeyEvent *e) { bool SuggestionsWidget::handleKeyEvent(int key) { if (key == Qt::Key_Enter || key == Qt::Key_Return) { return triggerSelectedRow(); - } else if (key == Qt::Key_Tab) { + } else if (key == Qt::Key_Tab + && (!AuthSession::Exists() || !Auth().supportMode())) { if (_selected < 0 || _selected >= _rows.size()) { setSelected(0); }