mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 10:50:50 +08:00
Clean PostStreamScrubber code
This commit is contained in:
parent
95f0edcd80
commit
0f9118fe2b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user