Version 4.5: Fix search in topic.

This commit is contained in:
John Preston 2022-12-30 15:50:56 +04:00
parent 2adc20f07f
commit 4f3510c47c
1 changed files with 2 additions and 4 deletions

View File

@ -2160,15 +2160,13 @@ bool Widget::setSearchInChat(Key chat, PeerData *from) {
}
}
_searchInMigrated = nullptr;
if (peer) {
if (peer && !forum) {
if (_layout != Layout::Main) {
return false;
} else if (const auto migrateTo = peer->migrateTo()) {
return setSearchInChat(peer->owner().history(migrateTo), from);
} else if (const auto migrateFrom = peer->migrateFrom()) {
if (!forum) {
_searchInMigrated = peer->owner().history(migrateFrom);
}
_searchInMigrated = peer->owner().history(migrateFrom);
}
}
if (searchInPeerUpdated) {