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:
Tim Abbott
2020-02-19 13:24:00 -08:00
committed by Tim Abbott
parent fa25738159
commit 961100024e
3 changed files with 10 additions and 7 deletions

View File

@@ -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