From 384a50822d353c2b2fd0ecb82e13b160a4cc993c Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Sun, 25 Nov 2012 15:21:55 -0500 Subject: [PATCH] Avoid unnecessary rows.get in pointer management (imported from commit ef1d8a885b264be797616a2bab3f23e2702949c5) --- zephyr/static/js/zephyr.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 118e79be7d..5198a266b8 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -752,7 +752,7 @@ function at_bottom_of_viewport() { function keep_pointer_in_view() { var candidate; - var next_message = rows.get(selected_message_id); + var next_message = selected_message; if (next_message.length === 0) return; @@ -781,7 +781,7 @@ function keep_pointer_in_view() { // I'm at the very top or the very bottom of the page. function move_pointer_at_page_top_and_bottom(delta) { if (delta !== 0 && (at_top_of_viewport() || at_bottom_of_viewport())) { - var next_message = rows.get(selected_message_id); + var next_message = selected_message; if (delta > 0) { // Scrolling up (want older messages) next_message = rows.prev_visible(next_message);