mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
navigate: Fix buggy detection of start/end.
I was not able to reproduce obviously badly broken behavior from these logic bugs, but after the renaming of message_viewport helpers in the last few commits, it's clear that this logic was trying to check if we're actually at the start/end of the possibly message feed, not just the rendered portion, and doing so incorrectly.
This commit is contained in:
@@ -1451,6 +1451,15 @@ export class MessageListView {
|
||||
);
|
||||
}
|
||||
|
||||
is_start_rendered() {
|
||||
// Used as a helper in checks for whether a given scroll
|
||||
// position is actually the very start of this view. It could
|
||||
// fail to be for two reasons: Either some older messages are
|
||||
// not rendered due to a render window, or we haven't finished
|
||||
// fetching the oldest messages for this view from the server.
|
||||
return this._render_win_start === 0 && this.list.data.fetch_status.has_found_oldest();
|
||||
}
|
||||
|
||||
get_row(id) {
|
||||
const $row = this._rows.get(id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user