mirror of https://github.com/zulip/zulip.git
resize: Don't call resize_page_components for new messages.
The resize handler is a somewhat expensive operation, which we'd like to avoid when processing the receipt of new messages. It's also unclear why it would be necesssary; bottom_whitespace is fixed in size, and the sidebars.
This commit is contained in:
parent
8d33a62eca
commit
530406e2ef
|
@ -26,7 +26,6 @@ const message_util = mock_esm("../../static/js/message_util");
|
|||
const notifications = mock_esm("../../static/js/notifications");
|
||||
const pm_list = mock_esm("../../static/js/pm_list");
|
||||
const recent_topics_data = mock_esm("../../static/js/recent_topics_data");
|
||||
const resize = mock_esm("../../static/js/resize");
|
||||
const stream_list = mock_esm("../../static/js/stream_list");
|
||||
const unread_ops = mock_esm("../../static/js/unread_ops");
|
||||
const unread_ui = mock_esm("../../static/js/unread_ui");
|
||||
|
@ -94,7 +93,6 @@ run_test("insert_message", ({override}) => {
|
|||
helper.redirect(message_util, "add_new_messages");
|
||||
helper.redirect(notifications, "received_messages");
|
||||
helper.redirect(recent_topics_data, "process_message");
|
||||
helper.redirect(resize, "resize_page_components");
|
||||
helper.redirect(stream_list, "update_streams_sidebar");
|
||||
helper.redirect(unread_ops, "process_visible");
|
||||
helper.redirect(unread_ui, "update_unread_counts");
|
||||
|
@ -112,7 +110,6 @@ run_test("insert_message", ({override}) => {
|
|||
[message_util, "add_new_messages_data"],
|
||||
[message_util, "add_new_messages"],
|
||||
[unread_ui, "update_unread_counts"],
|
||||
[resize, "resize_page_components"],
|
||||
[unread_ops, "process_visible"],
|
||||
[notifications, "received_messages"],
|
||||
[stream_list, "update_streams_sidebar"],
|
||||
|
|
|
@ -24,7 +24,6 @@ import {page_params} from "./page_params";
|
|||
import * as pm_list from "./pm_list";
|
||||
import * as recent_senders from "./recent_senders";
|
||||
import * as recent_topics_ui from "./recent_topics_ui";
|
||||
import * as resize from "./resize";
|
||||
import * as stream_list from "./stream_list";
|
||||
import * as stream_topic_history from "./stream_topic_history";
|
||||
import * as sub_store from "./sub_store";
|
||||
|
@ -156,7 +155,6 @@ export function insert_new_messages(messages, sent_by_this_client) {
|
|||
if (any_untracked_unread_messages) {
|
||||
unread_ui.update_unread_counts();
|
||||
}
|
||||
resize.resize_page_components();
|
||||
|
||||
unread_ops.process_visible();
|
||||
notifications.received_messages(messages);
|
||||
|
|
|
@ -3,7 +3,6 @@ import $ from "jquery";
|
|||
import {all_messages_data} from "./all_messages_data";
|
||||
import * as loading from "./loading";
|
||||
import * as message_store from "./message_store";
|
||||
import * as resize from "./resize";
|
||||
import * as unread from "./unread";
|
||||
import * as unread_ui from "./unread_ui";
|
||||
|
||||
|
@ -14,7 +13,6 @@ export function do_unread_count_updates(messages, expect_no_new_unreads = false)
|
|||
// The following operations are expensive, and thus should
|
||||
// only happen if we found any unread messages justifying it.
|
||||
unread_ui.update_unread_counts();
|
||||
resize.resize_page_components();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue