mirror of
https://github.com/flarum/core.git
synced 2025-07-29 12:40:40 +02:00
Clean PostStreamScrubber code
This commit is contained in:
@@ -99,7 +99,7 @@ export default class PostStreamScrubber extends Component {
|
|||||||
<div className="Scrubber-bar"/>
|
<div className="Scrubber-bar"/>
|
||||||
<div className="Scrubber-info">
|
<div className="Scrubber-info">
|
||||||
<strong>{viewing}</strong>
|
<strong>{viewing}</strong>
|
||||||
<span class="Scrubber-description">{retain || this.description}</span>
|
<span className="Scrubber-description">{retain || this.description}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="Scrubber-after"/>
|
<div className="Scrubber-after"/>
|
||||||
@@ -132,7 +132,7 @@ export default class PostStreamScrubber extends Component {
|
|||||||
*/
|
*/
|
||||||
goToLast() {
|
goToLast() {
|
||||||
this.props.stream.goToLast();
|
this.props.stream.goToLast();
|
||||||
this.index = this.props.stream.count();
|
this.index = this.count();
|
||||||
this.renderScrollbar(true);
|
this.renderScrollbar(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,7 +190,6 @@ export default class PostStreamScrubber extends Component {
|
|||||||
const marginTop = stream.getMarginTop();
|
const marginTop = stream.getMarginTop();
|
||||||
const viewportTop = scrollTop + marginTop;
|
const viewportTop = scrollTop + marginTop;
|
||||||
const viewportHeight = $(window).height() - marginTop;
|
const viewportHeight = $(window).height() - marginTop;
|
||||||
const viewportBottom = viewportTop + viewportHeight;
|
|
||||||
|
|
||||||
// Before looping through all of the posts, we reset the scrollbar
|
// Before looping through all of the posts, we reset the scrollbar
|
||||||
// properties to a 'default' state. These values reflect what would be
|
// properties to a 'default' state. These values reflect what would be
|
||||||
|
Reference in New Issue
Block a user