loadPage(start, end, backwards) {
    const redraw = () => {
      if (start < this.visibleStart || end > this.visibleEnd) return;

      const anchorIndex = backwards ? this.visibleEnd - 1 : this.visibleStart;
      anchorScroll(`.PostStream-item[data-index="${anchorIndex}"]`, () => m.redraw(true));

      this.unpause();
    };
    redraw();

    this.loadPageTimeouts[start] = setTimeout(() => {
      this.loadRange(start, end).then(() => {
        redraw();
        this.pagesLoading--;
      });
      this.loadPageTimeouts[start] = null;
    }, this.pagesLoading ? 1000 : 0);

    this.pagesLoading++;
  }
/**
   * Load a page of posts into the stream and redraw.
   *
   * @param {Integer} start
   * @param {Integer} end
   * @param {Boolean} backwards
   */
Load a page of posts into the stream and redraw.
Load a page of posts into the stream and redraw .
loadPage(start, end, backwards) {
    const redraw = () => {
      if (start < this.visibleStart || end > this.visibleEnd) return;
      const anchorIndex = backwards ? this.visibleEnd - 1 : this.visibleStart;
      anchorScroll(`.PostStream-item[data-index="${anchorIndex}"]`, () => m.redraw(true));
      this.unpause();
    };
    redraw();
    this.loadPageTimeouts[start] = setTimeout(() => {
      this.loadRange(start, end).then(() => {
        redraw();
        this.pagesLoading--;
      });
      this.loadPageTimeouts[start] = null;
    }, this.pagesLoading ? 1000 : 0);
    this.pagesLoading++;
  }
loadPage ( start , end , backwards ) { const redraw = ( ) => { if ( start < this . visibleStart || end > this . visibleEnd ) return ; const anchorIndex = backwards ? this . visibleEnd - 1 : this . visibleStart ; anchorScroll ( ` ${ anchorIndex } ` , ( ) => m . redraw ( true ) ) ; this . unpause ( ) ; } ; redraw ( ) ; this . loadPageTimeouts [ start ] = setTimeout ( ( ) => { this . loadRange ( start , end ) . then ( ( ) => { redraw ( ) ; this . pagesLoading -- ; } ) ; this . loadPageTimeouts [ start ] = null ; } , this . pagesLoading ? 1000 : 0 ) ; this . pagesLoading ++ ; }
Load a page of posts into the stream and redraw.
Load a page of posts into the stream and redraw .