mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
pointer: Remove orig_initial_pointer hackery.
The orig_initial_pointer variable was part of the implementation for ensuring server-initiated reloads preserve the user's selected message and scroll position (so that they are not disruptive). Previously, the logic did some unnecessary contortions to ensure the two goals: * The `pointer.js` logic knows what the server thinks the pointer is. * The `message_fetch.js` logic knows what anchor to use to center it's home view fetch. It's a lot cleaner to do this by not mutating page_params.pointer.
This commit is contained in:
@@ -84,10 +84,6 @@ exports.fast_forward_pointer = function () {
|
||||
|
||||
exports.initialize = function initialize() {
|
||||
exports.server_furthest_read = page_params.pointer;
|
||||
if (page_params.orig_initial_pointer !== undefined &&
|
||||
page_params.orig_initial_pointer > exports.server_furthest_read) {
|
||||
exports.server_furthest_read = page_params.orig_initial_pointer;
|
||||
}
|
||||
exports.furthest_read = exports.server_furthest_read;
|
||||
|
||||
// We only send pointer updates when the user has been idle for a
|
||||
|
||||
Reference in New Issue
Block a user