Beta version 3.0.5: Try fixing messages skipping.

This commit is contained in:
John Preston 2021-09-17 14:27:34 +03:00
parent ab6f5ae2ac
commit 26b9146c32

View file

@ -487,6 +487,19 @@ not_null<HistoryItem*> History::addNewItem(
} else if (!item->isHistoryEntry()) { } else if (!item->isHistoryEntry()) {
return item; return item;
} }
// In case we've loaded a new 'last' message
// and it is not in blocks and we think that
// we have all the messages till the bottom
// we should unload known history or mark
// currently loaded slice as not reaching bottom.
const auto shouldMarkBottomNotLoaded = loadedAtBottom()
&& !unread
&& !isEmpty();
if (shouldMarkBottomNotLoaded) {
setNotLoadedAtBottom();
}
if (!loadedAtBottom() || peer->migrateTo()) { if (!loadedAtBottom() || peer->migrateTo()) {
setLastMessage(item); setLastMessage(item);
if (unread) { if (unread) {