mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
Ignore new messages when lists are behind.
If individual messages arrive before we get the latest messages from the server, they can create gaps in rendering, and would often be offscreen anyway, so we just ignore them.
This commit is contained in:
@@ -42,6 +42,11 @@ exports.MessageList.prototype = {
|
||||
var bottom_messages = [];
|
||||
var interior_messages = [];
|
||||
|
||||
if (opts.messages_are_new && !self.fetch_status.can_append()) {
|
||||
blueslip.log('Ignoring new message(s) for list that is behind on fetches');
|
||||
return;
|
||||
}
|
||||
|
||||
// If we're initially populating the list, save the messages in
|
||||
// bottom_messages regardless
|
||||
if (self.selected_id() === -1 && self.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user