Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

stream_list: Rename handle_narrow_deactivated.

Tim Abbott0a189119aa5e
diff --git a/web/src/narrow.js b/web/src/narrow.js
index 98f5f641ea2..af670451805 100644
--- a/web/src/narrow.js
+++ b/web/src/narrow.js
@@ -562,7 +562,6 @@ export function activate(raw_operators, opts) {
const current_filter = narrow_state.filter();
pm_list.handle_narrow_activated(current_filter);
- stream_list.handle_narrow_activated(current_filter);
unread_ui.update_unread_banner();
// It is important to call this after other important updates
@@ -1021,6 +1020,7 @@ function handle_post_view_change(msg_list) {
message_view_header.render_title_area();
update_narrow_title(filter);
left_sidebar_navigation_area.handle_narrow_activated(filter);
+ stream_list.handle_narrow_activated(filter);
}
function handle_post_narrow_deactivate_processes(msg_list) {
@@ -1029,7 +1029,6 @@ function handle_post_narrow_deactivate_processes(msg_list) {
compose_fade.update_message_list();
pm_list.handle_narrow_deactivated();
- stream_list.handle_narrow_deactivated();
message_edit.handle_narrow_deactivated();
widgetize.set_widgets_for_list();
message_feed_top_notices.update_top_of_narrow_notices(msg_list);
diff --git a/web/src/stream_list.js b/web/src/stream_list.js
index 7c5ec6b78e0..fdd290fcf3b 100644
--- a/web/src/stream_list.js
+++ b/web/src/stream_list.js
@@ -666,7 +666,7 @@ export function handle_narrow_activated(filter) {
}
}
-export function handle_narrow_deactivated() {
+export function handle_message_view_deactivated() {
deselect_stream_items();
topic_zoom.clear_topics();
}
diff --git a/web/src/views_util.js b/web/src/views_util.js
index 6e64b82c625..9da1bc54c52 100644
--- a/web/src/views_util.js
+++ b/web/src/views_util.js
@@ -23,7 +23,7 @@ export function show(opts) {
// Hide selected elements in the left sidebar.
opts.highlight_view_in_left_sidebar();
- stream_list.handle_narrow_deactivated();
+ stream_list.handle_message_view_deactivated();
// Hide "middle-column" which has html for rendering
// a messages narrow. We hide it and show the view.
diff --git a/web/tests/narrow_activate.test.js b/web/tests/narrow_activate.test.js
index f7e49262be8..39edb8643ec 100644
--- a/web/tests/narrow_activate.test.js
+++ b/web/tests/narrow_activate.test.js
@@ -195,8 +195,8 @@ run_test("basics", ({override}) => {
[message_view_header, "render_title_area"],
[notifications, "redraw_title"],
[left_sidebar_navigation_area, "handle_narrow_activated"],
- [compose_actions, "on_narrow"],
[stream_list, "handle_narrow_activated"],
+ [compose_actions, "on_narrow"],
[compose_recipient, "update_narrow_to_recipient_visibility"],
]);
diff --git a/web/tests/recent_view.test.js b/web/tests/recent_view.test.js
index d2746b7de94..80ec85ca50f 100644
--- a/web/tests/recent_view.test.js
+++ b/web/tests/recent_view.test.js
@@ -166,7 +166,7 @@ mock_esm("../src/stream_data", {
get_stream_name_from_id: () => "stream_name",
});
mock_esm("../src/stream_list", {
- handle_narrow_deactivated: noop,
+ handle_message_view_deactivated: noop,
});
mock_esm("../src/timerender", {
relative_time_string_from_date: () => "Just now",
diff --git a/web/tests/stream_list.test.js b/web/tests/stream_list.test.js
index 011253676ef..6372ecf90b8 100644
--- a/web/tests/stream_list.test.js
+++ b/web/tests/stream_list.test.js
@@ -458,7 +458,7 @@ test_ui("narrowing", ({mock_template}) => {
topics_closed = true;
};
- stream_list.handle_narrow_deactivated();
+ stream_list.handle_message_view_deactivated();
assert.equal(removed_classes, "active-filter stream-expanded");
assert.ok(topics_closed);
});