From 70d9d8c09e4b1ce959b13a4db4617f3d7bacd0a1 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Wed, 23 Oct 2024 07:10:15 +0000 Subject: [PATCH] message_scroll: Remove unnecessary `setTimeout` call. Since `scroll_finished` is already called post render and we don't have to wait for anything rendering before calling `unread_ops.process_visible`, we can just directly call it. --- web/src/message_scroll.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/message_scroll.js b/web/src/message_scroll.js index dba55a6565..8057faaf98 100644 --- a/web/src/message_scroll.js +++ b/web/src/message_scroll.js @@ -96,7 +96,7 @@ export function scroll_finished() { // enter the screen and become read. Calling // unread_ops.process_visible will update necessary // data structures and DOM elements. - setTimeout(unread_ops.process_visible, 0); + unread_ops.process_visible(); } else { message_scroll_state.set_update_selection_on_next_scroll(true); }