mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
unread: Stop treating bottom of render windows as the global bottom.
The previous logic for both scrolling down and using pagedown would incorrectly mark an entire conversation as read when reaching the bottom of a render window, even if there were more messages loaded or to fetch from the server. Fix this error in the calculation by asking the correct data structures if we're actually at the bottom. To avoid the navigate.js keyboard shortcut code paths circumventing this new logic, or needing to duplicate it, they now call process_visible, rather than its helper.
This commit is contained in:
@@ -1439,6 +1439,18 @@ export class MessageListView {
|
||||
this.message_containers.clear();
|
||||
}
|
||||
|
||||
is_end_rendered() {
|
||||
// Used as a helper in checks for whether a given scroll
|
||||
// position is actually the very end of this view. It could
|
||||
// fail to be for two reasons: Either some newer messages are
|
||||
// not rendered due to a render window, or we haven't finished
|
||||
// fetching the newest messages for this view from the server.
|
||||
return (
|
||||
this._render_win_end === this.list.num_items() &&
|
||||
this.list.data.fetch_status.has_found_newest()
|
||||
);
|
||||
}
|
||||
|
||||
get_row(id) {
|
||||
const $row = this._rows.get(id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user