mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Cancel search on switching folders.
This commit is contained in:
parent
360366ba9e
commit
a0a9de1d18
1 changed files with 4 additions and 1 deletions
|
@ -655,6 +655,9 @@ void Widget::setupMoreChatsBar() {
|
||||||
controller()->activeChatsFilter(
|
controller()->activeChatsFilter(
|
||||||
) | rpl::start_with_next([=](FilterId id) {
|
) | rpl::start_with_next([=](FilterId id) {
|
||||||
storiesToggleExplicitExpand(false);
|
storiesToggleExplicitExpand(false);
|
||||||
|
if (!_searchInChat) {
|
||||||
|
cancelSearch();
|
||||||
|
}
|
||||||
|
|
||||||
if (!id) {
|
if (!id) {
|
||||||
_moreChatsBar = nullptr;
|
_moreChatsBar = nullptr;
|
||||||
|
@ -3345,7 +3348,7 @@ bool Widget::cancelSearch() {
|
||||||
if (_suggestions && clearSearchFocus) {
|
if (_suggestions && clearSearchFocus) {
|
||||||
setFocus();
|
setFocus();
|
||||||
}
|
}
|
||||||
return clearingQuery || clearingInChat;
|
return clearingQuery || clearingInChat || clearSearchFocus;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::cancelSearchInChat() {
|
void Widget::cancelSearchInChat() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue