2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Ignore tab key in emoji suggestions for Support mode.

This commit is contained in:
John Preston
2019-04-03 16:18:34 +04:00
parent b364cbbd69
commit 2dcbe15f8b

View File

@@ -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);
}