From d4c2fd6cb6750dcfcb800540aa1017b338a82d18 Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Tue, 23 Oct 2012 16:35:06 -0400 Subject: [PATCH] Don't update the pointer on the server when the client receives messages (imported from commit 54a0d10e94d2f4d39a29d4c8596bf4712c1eb45b) --- zephyr/static/js/zephyr.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index b0e64140a4..ca211f94a1 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -512,7 +512,8 @@ function add_messages(data) { // If we received the initially selected message, select it on the client side, // but not if the user has already selected another one during load. if ((selected_message_id === -1) && (message_dict.hasOwnProperty(initial_pointer))) { - select_message_by_id(initial_pointer, {then_scroll: true}); + select_message_by_id(initial_pointer, + {then_scroll: true, update_server: false}); } // If we prepended messages, then we need to scroll back to the pointer. @@ -523,7 +524,8 @@ function add_messages(data) { // We also need to re-select the message by ID, because we might have // removed and re-added the row as part of prepend collapsing. if ((data.where === 'top') && (selected_message_id >= 0)) { - select_message_by_id(selected_message_id, {then_scroll: true}); + select_message_by_id(selected_message_id, + {then_scroll: true, update_server: false}); } if (autocomplete_needs_update)