mirror of
https://github.com/flarum/core.git
synced 2025-07-12 04:16:24 +02:00
Optimize ScrollListener performance
Listen to "scroll" event and throttle callback executions instead of actively polling for changes to the scroll position. Fixes #1222.
This commit is contained in:
@ -2,7 +2,6 @@ import Component from '../../common/Component';
|
||||
import ScrollListener from '../../common/utils/ScrollListener';
|
||||
import PostLoading from './LoadingPost';
|
||||
import anchorScroll from '../../common/utils/anchorScroll';
|
||||
import mixin from '../../common/utils/mixin';
|
||||
import evented from '../../common/utils/evented';
|
||||
import ReplyPlaceholder from './ReplyPlaceholder';
|
||||
import Button from '../../common/components/Button';
|
||||
@ -586,7 +585,7 @@ class PostStream extends Component {
|
||||
*/
|
||||
unpause() {
|
||||
this.paused = false;
|
||||
this.scrollListener.update(true);
|
||||
this.scrollListener.update();
|
||||
this.trigger('unpaused');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user