mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Don't focus search when forum is opened.
This commit is contained in:
parent
c1a0172822
commit
1f3a3ec04b
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue