2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-22 02:07:24 +00:00

Close forum when searching in different chat.

This commit is contained in:
John Preston 2025-08-14 15:46:29 +04:00
parent 192a56ee15
commit 4cefc21819

View File

@ -2742,6 +2742,11 @@ void Widget::showMainMenu() {
}
void Widget::searchMessages(SearchState state) {
if (const auto peer = state.inChat.peer()) {
if (_openedForum && peer->forum() != _openedForum) {
controller()->closeForum();
}
}
applySearchState(std::move(state));
session().local().saveRecentSearchHashtags(_searchState.query);
}