mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-29 13:39:06 +00:00
Close forum when searching in different chat.
This commit is contained in:
parent
192a56ee15
commit
4cefc21819
@ -2742,6 +2742,11 @@ void Widget::showMainMenu() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Widget::searchMessages(SearchState state) {
|
void Widget::searchMessages(SearchState state) {
|
||||||
|
if (const auto peer = state.inChat.peer()) {
|
||||||
|
if (_openedForum && peer->forum() != _openedForum) {
|
||||||
|
controller()->closeForum();
|
||||||
|
}
|
||||||
|
}
|
||||||
applySearchState(std::move(state));
|
applySearchState(std::move(state));
|
||||||
session().local().saveRecentSearchHashtags(_searchState.query);
|
session().local().saveRecentSearchHashtags(_searchState.query);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user