mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
Don't save index twice in post stream post-load
This commit is contained in:
committed by
Franz Liedke
parent
f99f79e3c0
commit
8c362bf7c7
@@ -327,9 +327,9 @@ export default class PostStream extends Component {
|
|||||||
|
|
||||||
return Promise.all([$container.promise(), this.state.loadPromise]).then(() => {
|
return Promise.all([$container.promise(), this.state.loadPromise]).then(() => {
|
||||||
this.updateScrubber();
|
this.updateScrubber();
|
||||||
this.state.index = $item.data('index');
|
const index = $item.data('index');
|
||||||
m.redraw(true);
|
m.redraw(true);
|
||||||
const scroll = this.state.index == 0 ? 0 : $(`.PostStream-item[data-index=${$item.data('index')}]`).offset().top - this.getMarginTop();
|
const scroll = index == 0 ? 0 : $(`.PostStream-item[data-index=${$item.data('index')}]`).offset().top - this.getMarginTop();
|
||||||
$(window).scrollTop(scroll);
|
$(window).scrollTop(scroll);
|
||||||
this.calculatePosition();
|
this.calculatePosition();
|
||||||
this.state.paused = false;
|
this.state.paused = false;
|
||||||
|
Reference in New Issue
Block a user