mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Fix two bugs with supergroup history disappearing.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user