message_scroll: Don't process msg scroll events in non-message views.

This commit is contained in:
Aman Agrawal 2024-02-24 07:13:01 +00:00 committed by Tim Abbott
parent 861acb9abd
commit a44a4342b9
1 changed files with 5 additions and 1 deletions

View File

@ -133,8 +133,12 @@ export function initialize() {
$(document).on( $(document).on(
"scroll", "scroll",
_.throttle(() => { _.throttle(() => {
if (message_lists.current === undefined) {
return;
}
unread_ops.process_visible(); unread_ops.process_visible();
message_lists.current?.view.update_sticky_recipient_headers(); message_lists.current.view.update_sticky_recipient_headers();
scroll_finish(); scroll_finish();
}, 50), }, 50),
); );