2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

Don't focus search when forum is opened.

This commit is contained in:
John Preston
2024-05-06 20:45:55 +04:00
parent c1a0172822
commit 1f3a3ec04b

View File

@@ -1001,7 +1001,9 @@ void Widget::setupShortcuts() {
const auto history = forum->history();
controller()->searchInChat(history);
return true;
} else if (!_openedFolder && _search->isVisible()) {
} else if (!_openedFolder
&& !_childList
&& _search->isVisible()) {
_search->setFocus();
return true;
}
@@ -3291,6 +3293,7 @@ void Widget::keyPressEvent(QKeyEvent *e) {
bool Widget::redirectKeyToSearch(QKeyEvent *e) const {
if (_openedFolder
|| _openedForum
|| _childList
|| !_search->isVisible()
|| _search->hasFocus()) {
return false;