mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
Since the main autoscroll feature was implemeneted, the maybe_advance_to_recently_sent_message logic had an unfortunate structure, where the code for this potentially large scroll was running AFTER the autoscroll decision was made, but before an actual scroll could have occurred. This resulted in code that was very difficult to reason about, as there were 2 potential sources of scrolling when you send a new message, with little connection between their implementations either in location or implementation. Moving this into the main autoscrolling code path clarifies the code, with the added benefit of fixing a bug where we would report to the user that they needed to scroll down when in fact we were just about to scroll the bottom of the feed into view (via maybe_advance_to_recently_sent_message). With this change, we never display the "you need to scroll manually" message in the cast that we just scrolled you there via selecting a message.
10 KiB
10 KiB