mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix forum search open by Ctrl+F.
This commit is contained in:
parent
6a8edefc87
commit
583bcca6a9
1 changed files with 4 additions and 5 deletions
|
@ -1599,8 +1599,7 @@ void Widget::checkUpdateStatus() {
|
||||||
void Widget::setInnerFocus(bool unfocusSearch) {
|
void Widget::setInnerFocus(bool unfocusSearch) {
|
||||||
if (_childList) {
|
if (_childList) {
|
||||||
_childList->setInnerFocus();
|
_childList->setInnerFocus();
|
||||||
} else if ((_openedFolder || _openedForum)
|
} else if (_subsectionTopBar && _subsectionTopBar->searchSetFocus()) {
|
||||||
&& _subsectionTopBar->searchSetFocus()) {
|
|
||||||
return;
|
return;
|
||||||
} else if (!unfocusSearch
|
} else if (!unfocusSearch
|
||||||
&& (!_search->getLastText().isEmpty()
|
&& (!_search->getLastText().isEmpty()
|
||||||
|
@ -2967,10 +2966,10 @@ bool Widget::applySearchState(SearchState state) {
|
||||||
&& _lastSearchText == HistoryView::SwitchToChooseFromQuery()) {
|
&& _lastSearchText == HistoryView::SwitchToChooseFromQuery()) {
|
||||||
cancelSearch();
|
cancelSearch();
|
||||||
}
|
}
|
||||||
if (_searchState.inChat || !_searchState.query.isEmpty()) {
|
if (!_searchState.inChat && _searchState.query.isEmpty()) {
|
||||||
_search->setFocus();
|
|
||||||
} else {
|
|
||||||
setInnerFocus();
|
setInnerFocus();
|
||||||
|
} else if (!_subsectionTopBar || !_subsectionTopBar->searchSetFocus()) {
|
||||||
|
_search->setFocus();
|
||||||
}
|
}
|
||||||
updateForceDisplayWide();
|
updateForceDisplayWide();
|
||||||
applySearchUpdate();
|
applySearchUpdate();
|
||||||
|
|
Loading…
Add table
Reference in a new issue