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: Fix selected topic scrolled out of view.

Aman Agrawala84a982d0dbd
diff --git a/web/src/stream_list.ts b/web/src/stream_list.ts
index 0e9349d0f66..0ddcef6ce5c 100644
--- a/web/src/stream_list.ts
+++ b/web/src/stream_list.ts
@@ -1114,20 +1114,15 @@ export function handle_narrow_activated(
show_more_topics: boolean,
): void {
const $stream_li = update_stream_sidebar_for_narrow(filter);
- if ($stream_li) {
- scroll_stream_into_view($stream_li);
- if (!change_hash) {
- if (!is_zoomed_in() && show_more_topics) {
- zoom_in();
- } else if (is_zoomed_in() && !show_more_topics) {
- zoom_out();
- }
+ if ($stream_li && !change_hash) {
+ if (!is_zoomed_in() && show_more_topics) {
+ zoom_in();
+ } else if (is_zoomed_in() && !show_more_topics) {
+ zoom_out();
}
}
- if (is_zoomed_in()) {
- topic_list.left_sidebar_scroll_zoomed_in_topic_into_view();
- }
+ scroll_stream_into_view();
}
export function handle_message_view_deactivated(): void {