mirror of
https://github.com/zulip/zulip.git
synced 2026-07-09 21:21:47 +08:00
topic_list: Rename function to specify where it works.
This function only works to scroll topic in left sidebar.
This commit is contained in:
parent
6f672298b2
commit
82ec451a19
@ -782,7 +782,7 @@ export function handle_narrow_activated(
|
||||
}
|
||||
|
||||
if (is_zoomed_in()) {
|
||||
topic_list.scroll_zoomed_in_topic_into_view();
|
||||
topic_list.left_sidebar_scroll_zoomed_in_topic_into_view();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -328,7 +328,7 @@ export function rebuild_left_sidebar($stream_li: JQuery, stream_id: number): voi
|
||||
active_widgets.set(stream_id, widget);
|
||||
}
|
||||
|
||||
export function scroll_zoomed_in_topic_into_view(): void {
|
||||
export function left_sidebar_scroll_zoomed_in_topic_into_view(): void {
|
||||
const $selected_topic = $(".topic-list .topic-list-item.active-sub-filter");
|
||||
if ($selected_topic.length === 0) {
|
||||
// If we don't have a selected topic, scroll to top.
|
||||
@ -377,7 +377,7 @@ export function zoom_in(): void {
|
||||
// It is fine to force scroll here even if user has scrolled to a different
|
||||
// position since we just added some topics to the list which moved user
|
||||
// to a different position anyway.
|
||||
scroll_zoomed_in_topic_into_view();
|
||||
left_sidebar_scroll_zoomed_in_topic_into_view();
|
||||
}
|
||||
}
|
||||
|
||||
@ -385,7 +385,7 @@ export function zoom_in(): void {
|
||||
active_widget.build(spinner);
|
||||
|
||||
stream_topic_history_util.get_server_history(stream_id, on_success);
|
||||
scroll_zoomed_in_topic_into_view();
|
||||
left_sidebar_scroll_zoomed_in_topic_into_view();
|
||||
}
|
||||
|
||||
export function get_left_sidebar_topic_search_term(): string {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user