mirror of
https://github.com/flarum/core.git
synced 2025-08-06 16:36:47 +02:00
Simplify paused logic
This commit is contained in:
committed by
Franz Liedke
parent
5427b35c6d
commit
9c63c54868
@@ -23,9 +23,6 @@ export default class PostStream extends Component {
|
||||
this.loadPageTimeouts = {};
|
||||
this.pagesLoading = 0;
|
||||
|
||||
this.state.on('unpaused', () => {
|
||||
this.scrollListener.update();
|
||||
});
|
||||
this.state.on('scrollToLast', () => {
|
||||
this.scrollToLast();
|
||||
});
|
||||
|
@@ -75,7 +75,7 @@ class PostStreamState {
|
||||
this.trigger('scrollToNumber', number, noAnimation);
|
||||
})
|
||||
.then(() => {
|
||||
this.unpause();
|
||||
this.paused = false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ class PostStreamState {
|
||||
this.trigger('scrollToIndex', index, noAnimation, backwards);
|
||||
})
|
||||
.then(() => {
|
||||
this.unpause();
|
||||
this.paused = false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ class PostStreamState {
|
||||
const anchorIndex = backwards ? this.visibleEnd - 1 : this.visibleStart;
|
||||
anchorScroll(`.PostStream-item[data-index="${anchorIndex}"]`, () => m.redraw(true));
|
||||
|
||||
this.unpause();
|
||||
this.paused = false;
|
||||
};
|
||||
redraw();
|
||||
|
||||
@@ -368,7 +368,6 @@ class PostStreamState {
|
||||
*/
|
||||
unpause() {
|
||||
this.paused = false;
|
||||
this.trigger('unpaused');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user