mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 15:35:51 +00:00
Ignore tab key in emoji suggestions for Support mode.
This commit is contained in:
@@ -17,6 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
#include "platform/platform_specific.h"
|
#include "platform/platform_specific.h"
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
#include "core/event_filter.h"
|
#include "core/event_filter.h"
|
||||||
|
#include "auth_session.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
@@ -274,7 +275,8 @@ void SuggestionsWidget::keyPressEvent(QKeyEvent *e) {
|
|||||||
bool SuggestionsWidget::handleKeyEvent(int key) {
|
bool SuggestionsWidget::handleKeyEvent(int key) {
|
||||||
if (key == Qt::Key_Enter || key == Qt::Key_Return) {
|
if (key == Qt::Key_Enter || key == Qt::Key_Return) {
|
||||||
return triggerSelectedRow();
|
return triggerSelectedRow();
|
||||||
} else if (key == Qt::Key_Tab) {
|
} else if (key == Qt::Key_Tab
|
||||||
|
&& (!AuthSession::Exists() || !Auth().supportMode())) {
|
||||||
if (_selected < 0 || _selected >= _rows.size()) {
|
if (_selected < 0 || _selected >= _rows.size()) {
|
||||||
setSelected(0);
|
setSelected(0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user