diff --git a/Telegram/SourceFiles/history/history.cpp b/Telegram/SourceFiles/history/history.cpp index 5d1073834..9d30a999b 100644 --- a/Telegram/SourceFiles/history/history.cpp +++ b/Telegram/SourceFiles/history/history.cpp @@ -2135,7 +2135,11 @@ void History::getReadyFor(MsgId msgId) { } if (!isReadyFor(msgId)) { unloadBlocks(); - + if (const auto migratePeer = peer->migrateFrom()) { + if (const auto migrated = App::historyLoaded(migratePeer)) { + migrated->unloadBlocks(); + } + } if (msgId == ShowAtTheEndMsgId) { _loadedAtBottom = true; } diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 06014c6e5..f5f98e048 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -1945,7 +1945,7 @@ void HistoryInner::recountHistoryGeometry() { if (_migrated->blocks.back()->messages.back()->dateTime().date() == _history->blocks.front()->messages.front()->dateTime().date()) { if (_migrated->blocks.back()->messages.back()->data()->isGroupMigrate() && _history->blocks.front()->messages.front()->data()->isGroupMigrate()) { _historySkipHeight += _history->blocks.front()->messages.front()->height(); - } else { + } else if (_migrated->height() > _history->blocks.front()->messages.front()->displayedDateHeight()) { _historySkipHeight += _history->blocks.front()->messages.front()->displayedDateHeight(); } }