The discussion to display the post stream for.
When the page is scrolled, goToIndex is called, or the page is loaded, various listeners result in the scrubber being updated with a new position and values. However, if goToNumber is called, the scrubber will not be updated. Accordingly, we add logic to the scrubber's onupdate to update itself, but only when needed, as indicated by this property.
Whether or not the infinite-scrolling auto-load functionality is disabled.
The number of posts that are currently visible in the viewport.
StaticloadThe number of posts to load per page.
Load the next page of posts.
Load the previous page of posts.
Get the total number of posts in the discussion.
Check whether or not the scrubber should be disabled, i.e. if all of the posts are visible in the viewport.
Load and scroll up to the first post in the discussion.
Load and scroll to a certain index within the discussion.
Load and scroll down to the last post in the discussion.
Load and scroll to a post with a certain number.
The post number to go to. If 'reply', go to the last post and scroll the reply preview into view.
Clear the stream and load posts near a certain index. A page of posts surrounding the given index will be loaded. Returns a promise. If the given index is already loaded, the promise will be resolved immediately.
Clear the stream and load posts near a certain number. Returns a promise. If the post with the given number is already loaded, the promise will be resolved immediately.
Load a page of posts into the stream and redraw.
Get the visible page of posts.
Reset the stream so that a specific range of posts is displayed. If a range is not specified, the first page of posts will be displayed.
Optionalstart: numberOptionalend: numberMake sure that the given index is not outside of the possible range of indexes in the discussion.
Load through to the latest post in the discussion, expanding the visible window to the end of the stream. Unlike update(), this places no bound on how far the window has fallen behind — the caller is responsible for ensuring the end was being viewed before the posts being caught up on entered the store.
Update the stream so that it loads and includes the latest posts in the discussion, if the end is being viewed.
Note: viewingEnd() tolerates a drift of at most one post, so this is only suitable when the store has gained a single new post since the window was last synced (the live-event case). When several posts land in the store at once — e.g. they were missed while a realtime connection was down — capture viewingEnd() BEFORE pushing the new payloads and call syncEnd() directly instead.
Are we currently viewing the end of the discussion?
The description to render on the scrubber.