Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_viewport: Rename at_top for clarity.
Tim Abbott84ec491e3447
diff --git a/web/src/message_scroll.js b/web/src/message_scroll.jsindex 647e7f0cac0..f2661dccc9b 100644--- a/web/src/message_scroll.js+++ b/web/src/message_scroll.js@@ -82,7 +82,7 @@ export function scroll_finished() {message_scroll_state.set_update_selection_on_next_scroll(true);}- if (message_viewport.at_top()) {+ if (message_viewport.at_rendered_top()) {message_fetch.maybe_load_older_messages({msg_list: message_lists.current,});diff --git a/web/src/message_viewport.ts b/web/src/message_viewport.tsindex 34eba55cdfa..08e0380f01d 100644--- a/web/src/message_viewport.ts+++ b/web/src/message_viewport.ts@@ -38,7 +38,7 @@ export function set_last_movement_direction(value: number): void {last_movement_direction = value;}-export function at_top(): boolean {+export function at_rendered_top(): boolean {return scrollTop() <= 0;}@@ -461,7 +461,7 @@ export function keep_pointer_in_view(): void {const bottom_threshold = info.visible_top + (9 / 10) * info.visible_height;function message_is_far_enough_down(): boolean {- if (at_top()) {+ if (at_rendered_top()) {return true;}diff --git a/web/src/navigate.js b/web/src/navigate.jsindex 7526cc38926..1bfafbda3f2 100644--- a/web/src/navigate.js+++ b/web/src/navigate.js@@ -100,7 +100,7 @@ export function page_down_the_right_amount() {}export function page_up() {- if (message_viewport.at_top() && !message_lists.current.visibly_empty()) {+ if (message_viewport.at_rendered_top() && !message_lists.current.visibly_empty()) {message_lists.current.select_id(message_lists.current.first().id, {then_scroll: false});} else {page_up_the_right_amount();diff --git a/web/src/ui_init.js b/web/src/ui_init.jsindex 08b93983b4f..28b71641fa2 100644--- a/web/src/ui_init.js+++ b/web/src/ui_init.js@@ -197,7 +197,7 @@ export function initialize_kitchen_sink_stuff() {// scroll handler, but when we're at the top or bottom of the// page, the pointer may still need to move.- if (delta < 0 && message_viewport.at_top()) {+ if (delta < 0 && message_viewport.at_rendered_top()) {navigate.up();} else if (delta > 0 && message_viewport.at_rendered_bottom()) {navigate.down();