stream_list: Ignore left sidebar scroll until initial fetch is complete.

Since the initial fetch has a lot of messages, it can add many topics
to the left sidebar which can move the selected topic out of the view.

Note that `has_scrolled` is triggered even for the scrolls not triggered
by user since it is not easy to differentiate between the two events.
So, it is okay to ignore it initially.
This commit is contained in:
Aman Agrawal
2024-12-08 10:40:43 +05:30
committed by Tim Abbott
parent 23551c7774
commit 0af738269a
2 changed files with 3 additions and 3 deletions

View File

@@ -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 &&