Clean PostStreamScrubber code

This commit is contained in:
Clark Winkelmann 2018-11-11 19:03:22 +01:00
parent 95f0edcd80
commit 0f9118fe2b
No known key found for this signature in database
GPG Key ID: AC336FBC86CCD80B

View File

@ -99,7 +99,7 @@ export default class PostStreamScrubber extends Component {
<div className="Scrubber-bar"/>
<div className="Scrubber-info">
<strong>{viewing}</strong>
<span class="Scrubber-description">{retain || this.description}</span>
<span className="Scrubber-description">{retain || this.description}</span>
</div>
</div>
<div className="Scrubber-after"/>
@ -132,7 +132,7 @@ export default class PostStreamScrubber extends Component {
*/
goToLast() {
this.props.stream.goToLast();
this.index = this.props.stream.count();
this.index = this.count();
this.renderScrollbar(true);
}
@ -190,7 +190,6 @@ export default class PostStreamScrubber extends Component {
const marginTop = stream.getMarginTop();
const viewportTop = scrollTop + marginTop;
const viewportHeight = $(window).height() - marginTop;
const viewportBottom = viewportTop + viewportHeight;
// Before looping through all of the posts, we reset the scrollbar
// properties to a 'default' state. These values reflect what would be