mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 23:24:01 +02:00
Beta version 3.0.5: Try fixing messages skipping.
This commit is contained in:
parent
ab6f5ae2ac
commit
26b9146c32
1 changed files with 13 additions and 0 deletions
|
@ -487,6 +487,19 @@ not_null<HistoryItem*> History::addNewItem(
|
|||
} else if (!item->isHistoryEntry()) {
|
||||
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()) {
|
||||
setLastMessage(item);
|
||||
if (unread) {
|
||||
|
|
Loading…
Add table
Reference in a new issue