mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Fix search in archived chats and return back.
This commit is contained in:
parent
0e6470a087
commit
392df8b56f
1 changed files with 5 additions and 6 deletions
|
@ -346,8 +346,8 @@ Widget::Widget(
|
|||
}, lifetime());
|
||||
_inner->cancelSearchRequests(
|
||||
) | rpl::start_with_next([=] {
|
||||
setInnerFocus(true);
|
||||
applySearchState({});
|
||||
cancelSearch(true);
|
||||
controller->widget()->setInnerFocus();
|
||||
}, lifetime());
|
||||
_inner->cancelSearchFromRequests(
|
||||
) | rpl::start_with_next([=] {
|
||||
|
@ -2823,6 +2823,9 @@ bool Widget::applySearchState(SearchState state) {
|
|||
}
|
||||
hideChildList();
|
||||
}
|
||||
if (state.inChat && _layout == Layout::Main) {
|
||||
controller()->closeFolder();
|
||||
}
|
||||
|
||||
// Adjust state to be consistent.
|
||||
if (const auto peer = state.inChat.peer()) {
|
||||
|
@ -2929,10 +2932,6 @@ bool Widget::applySearchState(SearchState state) {
|
|||
_peerSearchQuery = QString();
|
||||
}
|
||||
|
||||
if (_searchState.inChat && _layout == Layout::Main) {
|
||||
controller()->closeFolder();
|
||||
}
|
||||
|
||||
if (_searchState.query != currentSearchQuery()) {
|
||||
setSearchQuery(_searchState.query);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue