1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 01:16:52 +02:00
This commit is contained in:
KyrneDev
2021-02-19 12:57:50 -08:00
committed by Alexander Skvortsov
parent 4464ab156f
commit 727440e88b
2 changed files with 10 additions and 3 deletions

View File

@@ -76,10 +76,17 @@ export default class PostStreamScrubber extends Component {
<div className="Scrubber-scrollbar"> <div className="Scrubber-scrollbar">
{showBackButton ? ( {showBackButton ? (
<a style={'top: ' + this.percentPerPost().index * this.stream.previousIndex + '%'} className="Scrubber-back" onclick={this.returnToLastPosition.bind(this)} title={app.translator.trans('core.forum.post_scrubber.back_title')}> <a
style={'top: ' + this.percentPerPost().index * this.stream.previousIndex + '%'}
className="Scrubber-back"
onclick={this.returnToLastPosition.bind(this)}
title={app.translator.trans('core.forum.post_scrubber.back_title')}
>
{icon('fas fa-chevron-left')} {icon('fas fa-chevron-left')}
</a> </a>
) : ''} ) : (
''
)}
<div className="Scrubber-before" /> <div className="Scrubber-before" />
<div className="Scrubber-handle"> <div className="Scrubber-handle">
<div className="Scrubber-bar" /> <div className="Scrubber-bar" />

View File

@@ -138,7 +138,7 @@ class PostStreamState {
this.needsScroll = true; this.needsScroll = true;
this.targetPost = { index }; this.targetPost = { index };
this.animateScroll = !noAnimation; this.animateScroll = !noAnimation;
this.previousIndex = (index === this.previousIndex) ? index : this.index; this.previousIndex = index === this.previousIndex ? index : this.index;
this.index = index; this.index = index;
m.redraw(); m.redraw();