mirror of https://github.com/zulip/zulip.git
stream_list: Rename handle_narrow_deactivated.
It did the same thing as handle_narrow_activated when passed the home_msg_list filter. We still leave a renamed version for use by the inbox/recent views.
This commit is contained in:
parent
20b2323c67
commit
0a189119aa
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"],
|
||||
]);
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue