topic_list: Rename function to specify use for left sidebar.

This commit is contained in:
Aman Agrawal
2025-04-09 16:25:29 +05:30
committed by Tim Abbott
parent 1b012f1eb3
commit 5ea42823ba
3 changed files with 5 additions and 5 deletions

View File

@@ -759,7 +759,7 @@ export function update_stream_sidebar_for_narrow(filter: Filter): JQuery | undef
clear_topics();
}
topic_list.rebuild($stream_li, stream_id);
topic_list.rebuild_left_sidebar($stream_li, stream_id);
return $stream_li;
}

View File

@@ -73,7 +73,7 @@ export function zoom_out(): void {
assert(widget !== undefined);
const parent_widget = widget.get_parent();
rebuild(parent_widget, stream_id);
rebuild_left_sidebar(parent_widget, stream_id);
}
type ListInfoNodeOptions =
@@ -251,7 +251,7 @@ export function clear_topic_search(e: JQuery.Event): void {
assert(widget !== undefined);
const parent_widget = widget.get_parent();
rebuild(parent_widget, stream_id);
rebuild_left_sidebar(parent_widget, stream_id);
}
}
@@ -276,7 +276,7 @@ export function get_stream_li(): JQuery | undefined {
return $stream_li;
}
export function rebuild($stream_li: JQuery, stream_id: number): void {
export function rebuild_left_sidebar($stream_li: JQuery, stream_id: number): void {
const active_widget = active_widgets.get(stream_id);
if (active_widget) {

View File

@@ -475,7 +475,7 @@ test_ui("narrowing", ({mock_template}) => {
initialize_stream_data();
topic_list.close = noop;
topic_list.rebuild = noop;
topic_list.rebuild_left_sidebar = noop;
topic_list.active_stream_id = noop;
topic_list.get_stream_li = noop;
$("#streams_header").outerHeight = () => 0;