Correctly show global search with in-chat.

This commit is contained in:
John Preston 2025-05-07 18:03:18 +04:00
parent 00a0e595ff
commit 9075a521f0

View file

@ -3803,7 +3803,11 @@ void InnerWidget::searchReceived(
clearPreviewResults();
}
const auto key = (!_openedForum || _searchState.inChat.topic())
const auto globalSearch = (_searchState.tab == ChatSearchTab::MyMessages)
|| (_searchState.tab == ChatSearchTab::PublicPosts);
const auto key = globalSearch
? Key()
: (!_openedForum || _searchState.inChat.topic())
? _searchState.inChat
: Key(_openedForum->history());
if (inject