mirror of https://github.com/zulip/zulip.git
Only call add_message_metadata once when receiving messages in a narrowed view
We memoize add_message_metadata by checking if the message is already in the all_msg_list. Therefore, we need to add messages to that message list before we add it to the narrowed_msg_list. (imported from commit 4346179376ef6f982162c02c6152a0d294bfb2c0)
This commit is contained in:
parent
96129b1cf0
commit
beba14a86c
|
@ -826,6 +826,9 @@ function get_updates(options) {
|
|||
// should no longer be needed
|
||||
messages = deduplicate_messages(messages);
|
||||
|
||||
add_messages(messages, all_msg_list);
|
||||
add_messages(messages, home_msg_list);
|
||||
|
||||
if (narrow.active()) {
|
||||
if (narrow.filter().can_apply_locally()) {
|
||||
add_messages(messages, narrowed_msg_list);
|
||||
|
@ -833,8 +836,7 @@ function get_updates(options) {
|
|||
maybe_add_narrowed_messages(messages, narrowed_msg_list);
|
||||
}
|
||||
}
|
||||
add_messages(messages, all_msg_list);
|
||||
add_messages(messages, home_msg_list);
|
||||
|
||||
process_visible_unread_messages();
|
||||
notifications.received_messages(messages);
|
||||
compose.update_faded_messages();
|
||||
|
|
Loading…
Reference in New Issue