Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
stream_list: Ignore left sidebar scroll until initial fetch is complete.
Aman Agrawal0af738269aef
diff --git a/web/src/message_fetch.ts b/web/src/message_fetch.tsindex 3c0cda85f69..551ff619d3e 100644--- a/web/src/message_fetch.ts+++ b/web/src/message_fetch.ts@@ -168,7 +168,7 @@ function process_result(data: MessageFetchResponse, opts: MessageFetchOptions):direct_message_group_data.process_loaded_messages(messages);stream_list.update_streams_sidebar();- stream_list.maybe_scroll_narrow_into_view();+ stream_list.maybe_scroll_narrow_into_view(!first_messages_fetch);if (message_lists.current !== undefined &&diff --git a/web/src/stream_list.ts b/web/src/stream_list.tsindex 670cdf1cfbe..acadac9755d 100644--- a/web/src/stream_list.ts+++ b/web/src/stream_list.ts@@ -1091,9 +1091,9 @@ export function scroll_stream_into_view($stream_li: JQuery): void {scroll_util.scroll_element_into_container($stream_li, $container, stream_header_height);}-export function maybe_scroll_narrow_into_view(): void {+export function maybe_scroll_narrow_into_view(first_messages_fetch_done: boolean): void {// we don't want to interfere with user scrolling once the page loads- if (has_scrolled) {+ if (has_scrolled && first_messages_fetch_done) {return;}