mirror of https://github.com/zulip/zulip.git
Don't update the pointer on the server when the client receives messages
(imported from commit 54a0d10e94d2f4d39a29d4c8596bf4712c1eb45b)
This commit is contained in:
parent
8a39292b5d
commit
d4c2fd6cb6
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue