2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 07:56:03 +00:00

Allow clearing search results.

This commit is contained in:
John Preston
2024-04-12 15:37:14 +04:00
parent 2a6ff9203b
commit 051ca51d3b
5 changed files with 141 additions and 36 deletions

View File

@@ -1453,13 +1453,19 @@ void Widget::setInnerFocus() {
} else if ((_openedFolder || _openedForum)
&& _subsectionTopBar->searchSetFocus()) {
return;
} else if (!_search->getLastText().isEmpty() || _searchInChat) {
} else if (!_search->getLastText().isEmpty()
|| _searchInChat
|| _searchHasFocus) {
_search->setFocus();
} else {
setFocus();
}
}
bool Widget::searchHasFocus() const {
return _searchHasFocus;
}
void Widget::jumpToTop(bool belowPinned) {
if (session().supportMode()) {
return;