mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 23:45:44 +00:00
Don't focus search when forum is opened.
This commit is contained in:
@@ -1001,7 +1001,9 @@ void Widget::setupShortcuts() {
|
|||||||
const auto history = forum->history();
|
const auto history = forum->history();
|
||||||
controller()->searchInChat(history);
|
controller()->searchInChat(history);
|
||||||
return true;
|
return true;
|
||||||
} else if (!_openedFolder && _search->isVisible()) {
|
} else if (!_openedFolder
|
||||||
|
&& !_childList
|
||||||
|
&& _search->isVisible()) {
|
||||||
_search->setFocus();
|
_search->setFocus();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -3291,6 +3293,7 @@ void Widget::keyPressEvent(QKeyEvent *e) {
|
|||||||
bool Widget::redirectKeyToSearch(QKeyEvent *e) const {
|
bool Widget::redirectKeyToSearch(QKeyEvent *e) const {
|
||||||
if (_openedFolder
|
if (_openedFolder
|
||||||
|| _openedForum
|
|| _openedForum
|
||||||
|
|| _childList
|
||||||
|| !_search->isVisible()
|
|| !_search->isVisible()
|
||||||
|| _search->hasFocus()) {
|
|| _search->hasFocus()) {
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user