mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
Call unread.process_loaded_messages earlier when inserting.
We want to maintain the invariant that unread.js always knows about unread messages as soon as they are loaded.
This commit is contained in:
@@ -56,8 +56,8 @@ function maybe_add_narrowed_messages(messages, msg_list, messages_are_new) {
|
||||
exports.insert_new_messages = function insert_new_messages(messages, locally_echoed) {
|
||||
messages = _.map(messages, message_store.add_message_metadata);
|
||||
|
||||
// You must add add messages to home_msg_list BEFORE
|
||||
// calling unread.process_loaded_messages.
|
||||
unread.process_loaded_messages(messages);
|
||||
|
||||
message_util.add_messages(messages, home_msg_list, {messages_are_new: true});
|
||||
message_util.add_messages(messages, message_list.all, {messages_are_new: true});
|
||||
|
||||
@@ -77,7 +77,6 @@ exports.insert_new_messages = function insert_new_messages(messages, locally_ech
|
||||
|
||||
activity.process_loaded_messages(messages);
|
||||
|
||||
unread.process_loaded_messages(messages);
|
||||
unread_ui.update_unread_counts();
|
||||
resize.resize_page_components();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user