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">
{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')}
</a>
) : ''}
) : (
''
)}
<div className="Scrubber-before" />
<div className="Scrubber-handle">
<div className="Scrubber-bar" />

View File

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