Fix cancel search with a similar channel open.

Fixes #28079.
This commit is contained in:
John Preston 2024-06-29 10:49:15 +04:00
parent 69d21f73ef
commit 374b3c68ac

View file

@ -3668,7 +3668,11 @@ bool Widget::cancelSearch(CancelSearchOptions options) {
_inner->clearFilter();
applySearchState(std::move(updatedState));
if (_suggestions && clearSearchFocus) {
const auto clearLockedFocus = !_searchHasFocus;
setInnerFocus(true);
if (clearLockedFocus) {
processSearchFocusChange();
}
}
updateForceDisplayWide();
return clearingQuery || clearingInChat || clearSearchFocus;