Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

message_scroll: Add some explanatory comments.

Tim Abbott4f8da7462d7a
diff --git a/web/src/message_scroll.js b/web/src/message_scroll.js
index f2661dccc9b..6a5dabdb0dd 100644
--- a/web/src/message_scroll.js
+++ b/web/src/message_scroll.js
@@ -83,12 +83,18 @@ export function scroll_finished() {
}
if (message_viewport.at_rendered_top()) {
+ // Subtle note: While we've only checked that we're at the
+ // very top of the render window (i.e. there may be some more
+ // cached messages to render), it's a good idea to fetch
+ // additional message history even if we're not actually at
+ // the edge of what we already have from the server.
message_fetch.maybe_load_older_messages({
msg_list: message_lists.current,
});
}
if (message_viewport.at_rendered_bottom()) {
+ // See the similar message_viewport.at_rendered_top block.
message_fetch.maybe_load_newer_messages({
msg_list: message_lists.current,
});