mirror of
https://github.com/flarum/framework.git
synced 2025-03-21 20:45:14 +08:00
Don't save index twice in post stream post-load
This commit is contained in:
parent
f99f79e3c0
commit
8c362bf7c7
@ -327,9 +327,9 @@ export default class PostStream extends Component {
|
||||
|
||||
return Promise.all([$container.promise(), this.state.loadPromise]).then(() => {
|
||||
this.updateScrubber();
|
||||
this.state.index = $item.data('index');
|
||||
const index = $item.data('index');
|
||||
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);
|
||||
this.calculatePosition();
|
||||
this.state.paused = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user